Have a player...

Babacool

Új tag
To the body of your web page. Then change the names + Urls with yours. :)

Kód:
[SIZE=1][COLOR=#840084]<CENTER>[/COLOR][/SIZE][SIZE=1][COLOR=#808080]<!-- start code provided by createblog.com -->[/COLOR][/SIZE]
<FONT size=1>[COLOR=#840084]<OBJECT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"Player"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] height=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"0"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] width=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"0"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] CLASSID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
 
<FONT size=1>[SIZE=1][COLOR=#ff0000]NAME=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"uiMode"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] VALUE=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"invisible"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]

[SIZE=1][SIZE=1][COLOR=#ff0000]NAME=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"Autostart"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] VALUE=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"False"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]</OBJECT>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<FORM< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"form"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<SELECT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"playlist"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] size=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"1"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
[SIZE=1][COLOR=#808080]<!-- Add song info that appears in drop down list here -->[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"0"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Unchained Melody</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"1"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Brown eyes blue</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"2"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Longer</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"3"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Only You</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"4"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Leaving on a jet plain</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"5"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>I will always love you</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"6"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>I just called to say..</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"7"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Love me tender</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"8"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>My heart will go on</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<OPTION< font>[/COLOR][SIZE=1][COLOR=#ff0000]value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"9"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Lookin' for love</OPTION>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]</SELECT>[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#840084]<BUTTON< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"BackButton"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onClick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"Back(forms['form'].playlist);"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]> <<[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] </BUTTON>[/COLOR][/SIZE]
[SIZE=1][COLOR=#ff0000]<BUTTON id="</font">[/COLOR][SIZE=1][COLOR=#0000ff]"PlayPauseButton"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onClick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"PlayPause(forms['form'].playlist);"><FONT< font>[SIZE=1][COLOR=#ff0000] color=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"green">Play[/COLOR][/SIZE][/COLOR]</BUTTON>[/SIZE][/SIZE]
[SIZE=1][COLOR=#ff0000]<BUTTON id="</font">[/COLOR][SIZE=1][COLOR=#0000ff]"NextButton"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onClick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"Next(forms['form'].playlist);">[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] >[/COLOR][/SIZE][SIZE=1][COLOR=#840084]> [/COLOR][/SIZE]</BUTTON> [/SIZE][/SIZE]
[SIZE=1][COLOR=#840084]<BUTTON< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"StopButton"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onclick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"Stop();"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]><FONT< font>[SIZE=1][COLOR=#ff0000] color=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"maroon"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Stop[/COLOR]</BUTTON>[/SIZE]
[SIZE=1][COLOR=#840084][B]<FONT< font>[SIZE=1][COLOR=#ff0000]size=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"3"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] color=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"black"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>Shuffle[/COLOR][/SIZE][/B][SIZE=1]<INPUT< font>[/SIZE][SIZE=1][COLOR=#ff0000] TYPE=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]checkbox[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] CHECKED ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ShuffleSwitch"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onclick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ToggleShuffle(this);"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] value=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ON"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]</FORM>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<COMMENT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"PlayHTML"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]><FONT< font>[SIZE=1][COLOR=#ff0000] color=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"green"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]> Play [/COLOR]</COMMENT>[/SIZE]
[SIZE=1][COLOR=#840084]<COMMENT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ShuffleOnHTML"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]><INPUT< font>[/COLOR][SIZE=1][COLOR=#ff0000] TYPE=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]checkbox[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] CHECKED ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ShuffleSwitch"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onclick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ToggleShuffle(this);"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]></COMMENT>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<COMMENT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ShuffleOffHTML"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]><INPUT< font>[/COLOR][SIZE=1][COLOR=#ff0000] TYPE=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]checkbox[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] UNCHECKED ID=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ShuffleSwitch"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] onclick=[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]"ToggleShuffle(this);"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]></COMMENT>[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#840084]<SCRIPT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="Main"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] Language[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="JavaScript"[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var songs = new Array();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]//*******************************//[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]//****** CHANGEABLE STUFF *******//[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]//*******************************// [/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]var shuffle = false; // false = shuffle off, true = shuffle on[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var autoStart = true; // false = autoStart off, true = autoStart on[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]var numberTracks = true; // true = place track number in front of list items, false = no track numbers[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]// Add song URLs here (make sure it matches up with the order you have for song info, and urls need quotes):[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[0]="http://www.angelfire.com/ok2/WildDancer/images/unchained2.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[1]="http://jacsplace.topcities.com/dontitmakemybrowneyesblue.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[2]="http://www.angelfire.com/on3/oceanangel/DanFogelbergLonger.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[3]="http://www.celebritydirect.org/notweb/music/pl-onlyyou.mp3";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[4]="http://www.angelfire.com/on2/MoniqueM/images/LeavingOnAJetPlane.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[5]="http://www.angelfire.com/hi4/MoniqueM/images/alwaysloveyou.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[6]="http://www.geocities.com/poppage11/StevieWonderIJustCalledToSayILovedYou.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[7]="http://www.angelfire.com/oh2/MoniqueM/images/lovemetender.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[8]="http://www.angelfire.com/on3/MoniqueM/images/MyHeartWillGoOn.wav";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]songs[9]="http://www.davidruffo.com/snippets/johnny lee - looking for love in all the wrong places.mp3";[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]//*******************************//[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]//*******************************//[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Initializations //[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]with (document){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var length = forms['form'].playlist.length;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if(numberTracks){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]for (var i = 0; i < length; i++){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].playlist.options[i].innerHTML = (i+1) + " - " + forms['form'].playlist.options[i].innerHTML;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]if (shuffle) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var randsg = Math.floor(Math.random()*songs.length);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.url = songs[randsg];[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].playlist.options[randsg].selected = true;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].ShuffleSwitch.outerHTML = ShuffleOnHTML.innerHTML;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]else {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].ShuffleSwitch.outerHTML = ShuffleOffHTML.innerHTML;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.url = songs[0];[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if(autoStart){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var snum = forms['form'].playlist.selectedIndex;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if(Player.url != songs[snum]){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.url = songs[snum];[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.controls.Play();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Functions //[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Discription: "PlayPause" will toggle playing and pausing if the same song is still selected,[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// otherwise it will load the newly selected song[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]function PlayPause(list) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var snum = list.selectedIndex;[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]if((Player.url == songs[snum] && Player.url != "") && Player.playState != 1){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if(Player.playState == 3){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.controls.Pause();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]else {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.controls.Play();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]else {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.url = songs[snum];[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.controls.Play();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Discription: "Next" will move to the next music file if shuffle is off[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// otherwise it will load a random song. Calls PlayPause to start music.[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]function Next(list) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var snum = list.selectedIndex;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if (!shuffle) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if (snum == list.length-1) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]snum = -1;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]snum++;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]else {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var temp;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]do{[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]temp = Math.floor(Math.random()*songs.length);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]} while(temp == snum);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]snum = temp;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]list.options[snum].selected = true;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]PlayPause(list);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Discription: "Back" does the same thing as "Next" but moves backwads[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// through the list. If shuffle is on then picks a random song.[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]function Back(list) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var snum = list.selectedIndex;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if (!shuffle) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if (snum == 0){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]snum = list.length;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]snum--;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]else {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var temp;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]do{[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]temp = Math.floor(Math.random()*songs.length);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]} while(temp == snum);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]snum = temp;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]list.options[snum].selected = true;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]PlayPause(list);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Discription: Self explanitory.[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]function Stop(){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.controls.Stop();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Discription: Makes the shuffle flag the same as the status of the CheckBox[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// The status of the checkbox (true/false) indicates if the box is checked[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]function ToggleShuffle(CheckBox) {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]shuffle = CheckBox.status;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]</SCRIPT>[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]<SCRIPT< font>[/COLOR][SIZE=1][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="StateChangeHandler"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] Language =[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff] "JavaScript"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] For =[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff] "Player"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000] Event = playStateChange(NewState)[/COLOR][/SIZE][SIZE=1][COLOR=#840084]>[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// Description: This is an interupt handler used to handle instances when the[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]// state of the player changes to play or stop for example.[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]//STATE.innerText = NewState;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]switch(NewState){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]case 8: // Handles player after it just finishes playing through a song[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var num = document.forms['form'].playlist.selectedIndex;[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]if (!shuffle){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if(num == document.forms['form'].playlist.length-1){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]num = -1;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]num++;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]else {[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var temp;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]do{[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]temp = Math.floor(Math.random()*songs.length);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]} while(temp == num);[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]num = temp;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]document.forms['form'].playlist.options[num].selected = true;[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]PreviousState = NewState;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]break;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]case 1: // Handles player after it stops[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]if(PreviousState == 8){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]var num = document.forms['form'].playlist.selectedIndex;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.settings.autoStart = true;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.url = songs[num];[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]PreviousState = NewState;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]else if (PreviousState != 3 && PreviousState != 2){[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.controls.Play();[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]Player.settings.autoStart = false;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
 
[SIZE=1][COLOR=#800000]else{[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]break;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]case 3: // Handles player after it starts to play[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]PreviousState = NewState;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].PlayPauseButton.innerHTML = "Pause";[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]shuffle = document.forms['form'].ShuffleSwitch.status;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]break;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]case 2: // Handles player after being paused[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]PreviousState = NewState;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]break;[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]default:[/COLOR][/SIZE]
[SIZE=1][COLOR=#800000]}[/COLOR][/SIZE]
[SIZE=1][COLOR=#840084]</SCRIPT></CENTER>[/COLOR][/SIZE]
[/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/COLOR][/SIZE][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE][/SIZE]





<CENTER><!-- start code provided by createblog.com -->
<OBJECT< font>


</CENTER><CENTER></SCRIPT></CENTER>

NOT : If you take a song from Forum...don't link it but download it to your PC. Otherwise Forum opens up very late. :cool:



[/SIZE][/SIZE][/SIZE]
 
Oldal tetejére