/    Sign up×
Community /Pin to ProfileBookmark

Customize Up/Down Arrow Drop Down Menu on WMP?

EDIT:
[B]NEW Question on the 3rd post… since I don’t want to create a new thread.[/B]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@BigMoosieAug 20.2005 — First question: No

Second question: I see no dot.
Copy linkTweet thisAlerts:
@dilettanteauthorAug 21.2005 — Hmm, ok... for some reason, I can't get CSS to work for the play buttons for this player:

<OBJECT ID="Player" height="0" width="0" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<PARAM NAME="uiMode" VALUE="invisible">
<PARAM NAME="Autostart" VALUE="False">
</object>

<FORM ID="form">

<SELECT ID="playlist" size="1">

<!-- Add song info that appears in drop down list here -->
<option value="0">Artist Name - Song Title</option>
<option value="1">Artist Name - Song Title</option>
<option value="2">Artist Name - Song Title</option>
<option value="3">Artist Name - Song Title</option>
<option value="4">Artist Name - Song Title</option>

</SELECT>

<BR>
<BUTTON ID="BackButton" onClick="Back(forms['form'].playlist);"> << </BUTTON>
<BUTTON ID="PlayPauseButton" onClick="PlayPause(forms['form'].playlist);"><FONT color="green">  Play  </FONT></BUTTON>
<BUTTON ID="NextButton" onClick="Next(forms['form'].playlist);"> >> </BUTTON> 
<BUTTON ID="StopButton" onclick="Stop();"><FONT color="maroon">Stop</FONT></BUTTON>
<b><font size="3" color="black">Shuffle</font></b><INPUT TYPE=checkbox CHECKED ID="ShuffleSwitch" onclick="ToggleShuffle(this);" value="ON">

</FORM>
</CENTER>


<comment ID="PlayHTML"><FONT color="green">  Play  </FONT></comment>
<comment ID="ShuffleOnHTML"><INPUT TYPE=checkbox CHECKED ID="ShuffleSwitch" onclick="ToggleShuffle(this);"></comment>
<comment ID="ShuffleOffHTML"><INPUT TYPE=checkbox UNCHECKED ID="ShuffleSwitch" onclick="ToggleShuffle(this);"></comment>


<script ID="Main" Language="JavaScript">

<i> </i>var songs = new Array();

<i> </i>//*******************************//
<i> </i>//****** CHANGEABLE STUFF *******//
<i> </i>//*******************************//

<i> </i>var shuffle = false; // false = shuffle off, true = shuffle on

<i> </i>var autoStart = true; // false = autoStart off, true = autoStart on

<i> </i>var numberTracks = true; // true = place track number in front of list items, false = no track numbers

<i> </i>// Add song URLs here (make sure it matches up with the order you have for song info, and urls need quotes):
<i> </i>songs[0]="musicURL";
<i> </i>songs[1]="musicURL";
<i> </i>songs[2]="musicURL";
<i> </i>songs[3]="musicURL";
<i> </i>songs[4]="musicURL";

<i> </i>//*******************************//
<i> </i>//*******************************//

// Initializations //
with (document){
var length = forms['form'].playlist.length;

<i> </i>if(numberTracks){
for (var i = 0; i &lt; length; i++){
forms['form'].playlist.options[i].innerHTML = (i+1) + " - " + forms['form'].playlist.options[i].innerHTML;
}
}

<i> </i>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;
}

<i> </i>else {
forms['form'].ShuffleSwitch.outerHTML = ShuffleOffHTML.innerHTML;
Player.url = songs[0];
}

<i> </i>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;

<i> </i>if((Player.url == songs[snum] &amp;&amp; Player.url != "") &amp;&amp; Player.playState != 1){
if(Player.playState == 3){
Player.controls.Pause();
}

else {
Player.controls.Play();
}
}

<i> </i>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++;
}

<i> </i>else {
var temp;
do{
temp = Math.floor(Math.random()*songs.length);
} while(temp == snum);
snum = temp;
}

<i> </i>list.options[snum].selected = true;
<i> </i>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--;
}

<i> </i>else {
var temp;
do{
temp = Math.floor(Math.random()*songs.length);
} while(temp == snum);
snum = temp;
}

<i> </i>list.options[snum].selected = true;
<i> </i>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;
}

&lt;/SCRIPT&gt;

&lt;script ID="StateChangeHandler" Language = "JavaScript" For = "Player" Event = playStateChange(NewState)&gt;

// 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;
}

<i> </i>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;

<i> </i>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 &amp;&amp; PreviousState != 2){
Player.controls.Play();
Player.settings.autoStart = false;
}

else{
forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;
}
break;

<i> </i>case 3: // Handles player after it starts to play
PreviousState = NewState;
forms['form'].PlayPauseButton.innerHTML = "Pause";
shuffle = document.forms['form'].ShuffleSwitch.status;
break;

<i> </i>case 2: // Handles player after being paused
PreviousState = NewState;
forms['form'].PlayPauseButton.innerHTML = PlayHTML.innerHTML;
break;

<i> </i>default:
}

&lt;/SCRIPT&gt;


<i>
</i>&lt;style type="text/css"&gt;
input, select, textarea, .textfield, .button {
color: #00000;
border: 1px solid #FFFFFF;
font:normal 10pt arial;
background-color: #red <br/>
&lt;style&gt;
}


Anyone know how?
×

Success!

Help @dilettante spread the word by sharing this article on Twitter...

Tweet This
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...