Asagidaki script'i web sayfanizin body kismina yerlestiriniz ve sonra kendi sarki adres ve isimlerini buradakiler ile degistiriniz.
*************************************
Kod:
<p><center><start>
<OBJECT>
<PARAM>
<PARAM>
</object>
<FORM>
<SELECT>
<Add>
<option>Unchained Melody</option>
<option>Brown eyes blue</option>
<option>Longer</option>
<option>Only You</option>
<option>Leaving on a jet plain</option>
<option>I will always love you</option>
<option>I just called to say..</option>
<option>Love me tender</option>
<option>My heart will go on</option>
<option>Lookin' for love</option>
</SELECT>
<BR>
<BUTTON> << </BUTTON>
<BUTTON><FONT color="green">Play</FONT></BUTTON>
<BUTTON> >> </BUTTON>
<BUTTON><FONT color="maroon">Stop</FONT></BUTTON>
<font size="3" color="black">Shuffle</font><INPUT>
</FORM>
<comment><FONT color="green"> Play </FONT></comment>
<comment><INPUT></comment>
<comment><INPUT></comment>
<script>
var songs = new Array();
//*******************************//
//****** CHANGEABLE STUFF *******//
//*******************************//
var shuffle = false; // false = shuffle off, true = shuffle on
var autoStart = true; // false = autoStart off, true = autoStart on
var numberTracks = true; // true = place track number in front of list items, false = no track numbers
// Add song URLs here (make sure it matches up with the order you have for song info, and urls need quotes):
songs[0]="
http://www.angelfire.com/ok2/WildDancer/images/unchained2.wav";
songs[1]="
http://jacsplace.topcities.com/dontitmakemybrowneyesblue.wav";
songs[2]="
http://www.angelfire.com/on3/oceanangel/DanFogelbergLonger.wav";
songs[3]="
http://www.celebritydirect.org/notweb/music/pl-onlyyou.mp3";
songs[4]="
http://www.angelfire.com/on2/MoniqueM/images/LeavingOnAJetPlane.wav";
songs[5]="
http://www.angelfire.com/hi4/MoniqueM/images/alwaysloveyou.wav";
songs[6]="
http://www.geocities.com/poppage11/StevieWonderIJustCalledToSayILovedYou.wav";
songs[7]="
http://www.angelfire.com/oh2/MoniqueM/images/lovemetender.wav";
songs[8]="
http://www.angelfire.com/on3/MoniqueM/images/MyHeartWillGoOn.wav";
songs[9]="
http://www.davidruffo.com/snippets/johnny lee - looking for love in all the wrong places.mp3";
//*******************************//
//*******************************//
// Initializations //
with (document){
var length = forms['form'].playlist.length;
if(numberTracks){
for (var i = 0; i < length; i++){
forms['form'].playlist.options
.innerHTML = (i+1) + " - " + forms['form'].playlist.options.innerHTML;
}
}
if (shuffle) {
var randsg = Math.floor(Math.random()*songs.length);
Player.url = songs[randsg];
forms['form'].playlist.options[randsg].selected = true;
forms['form'].ShuffleSwitch.outerHTML = ShuffleOnHTML.innerHTML;
}
else {
forms['form'].ShuffleSwitch.outerHTML = ShuffleOffHTML.innerHTML;
Player.url = songs[0];
}
if(autoStart){
var snum = forms['form'].playlist.selectedIndex;
if(Player.url != songs[snum]){
Player.url = songs[snum];
}
Player.controls.Play();
}
}
// Functions //
// Discription: "PlayPause" will toggle playing and pausing if the same song is still selected,
// otherwise it will load the newly selected song
function PlayPause(list) {
var snum = list.selectedIndex;
if((Player.url == songs[snum] && Player.url != "") && Player.playState != 1){
if(Player.playState == 3){
Player.controls.Pause();
}
else {
Player.controls.Play();
}
}
else {
Player.url = songs[snum];
Player.controls.Play();
}
}
// Discription: "Next" will move to the next music file if shuffle is off
// otherwise it will load a random song. Calls PlayPause to start music.
function Next(list) {
var snum = list.selectedIndex;
if (!shuffle) {
if (snum == list.length-1) {
snum = -1;
}
snum++;
}
else {
var temp;
do{
temp = Math.floor(Math.random()*songs.length);
} while(temp == snum);
snum = temp;
}
list.options[snum].selected = true;
PlayPause(list);
}
// Discription: "Back" does the same thing as "Next" but moves backwads
// through the list. If shuffle is on then picks a random song.
function Back(list) {
var snum = list.selectedIndex;
if (!shuffle) {
if (snum == 0){
snum = list.length;
}
snum--;
}
else {
var temp;
do{
temp = Math.floor(Math.random()*songs.length);
} while(temp == snum);
snum = temp;
}
list.options[snum].selected = true;
PlayPause(list);
}
// Discription: Self explanitory.
function Stop(){
Player.controls.Stop();
}
// Discription: Makes the shuffle flag the same as the status of the CheckBox
// The status of the checkbox (true/false) indicates if the box is checked
function ToggleShuffle(CheckBox) {
shuffle = CheckBox.status;
}
</SCRIPT>
<script>
// Description: This is an interupt handler used to handle instances when the
// state of the player changes to play or stop for example.
//STATE.innerText = NewState;
switch(NewState){
case 8: // Handles player after it just finishes playing through a song
var num = document.forms['form'].playlist.selectedIndex;
if (!shuffle){
if(num == document.forms['form'].playlist.length-1){
num = -1;
}
num++;
}
else {
var temp;
do{
temp = Math.floor(Math.random()*songs.length);
} while(temp == num);
num = temp;
}
document.forms['form'].playlist.options[num].selected = true;
PreviousState = NewState;
break;
case 1: // Handles player after it stops
if(PreviousState == 8){
var num = document.forms['form'].playlist.selectedIndex;
Player.settings.autoStart = true;
Player.url = songs[num];
PreviousState = NewState;
}
else if (PreviousState != 3 && PreviousState != 2){
Player.controls.Play();
Player.settings.autoStart = false;
}
else{
forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;
}
break;
case 3: // Handles player after it starts to play
PreviousState = NewState;
forms['form'].PlayPauseButton.innerHTML = "Pause";
shuffle = document.forms['form'].ShuffleSwitch.status;
break;
case 2: // Handles player after being paused
PreviousState = NewState;
forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;
break;
default:
}
</SCRIPT>
</center>
*******************************************
NOT : center 'i
<left> veya <right> ile degistirebilirsiniz. Ama formülün sonunda da </left> veya </right>yazmaniz gerekiyor.
Kolay gelsin. :) Eger script'in nasil calistini görmek istiyorsaniz > IZMIR ' e hoparlörleriniz acik olarak bakabilirsiniz.