/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Music.. playing 1 album everyday but a different one each day(total of 7 albums/list)

I was wondering if anyone knew how to play a different album each day of the week. So there are 7 different albums or list of songs. Right now I have a music player with a drop down list.

to post a comment
JavaScript

9 Comments(s)

Copy linkTweet thisAlerts:
@AltF4Feb 28.2006 — You need random generater.
[code=html]
<script language="Javascript">
var musicList = new Array;
musicList[0] = "album name 1.mp3";
musicList[1] = "album name 2.mp3";
musicList[2] = "album name 3.mp3";
musicList[3] = "album name 4.mp3";
musicList[4] = "album name 5.mp3";
musicList[5] = "album name 6.mp3";
musicList[6] = "album name 7.mp3";
var choice = Math.floor(Math.random() * musicList.length);
</script>
<body>
<embed bgsound="'musicList[choice]'">
[/code]

It should work but I'm not exactly sure. This the same thing as a random image thing. So Good Luck!
Copy linkTweet thisAlerts:
@SilentFire666authorFeb 28.2006 — That wont work for what i want to do....I already have that right now. I want to play a different album each day but not randomly...i still want the songs to play randomly just not picking the album. So like Sunday would play one album, Monday would play another one and so on. Then the next week it plays the same album it played the Sunday before...but thanks for trying...
Copy linkTweet thisAlerts:
@AltF4Feb 28.2006 — You could run "If" statements. Check out htmlgoodies.com for date functions and if statements.
Copy linkTweet thisAlerts:
@AltF4Feb 28.2006 — Sorry
Copy linkTweet thisAlerts:
@James_GatkaFeb 28.2006 — SilentFire666:

Create a playlist file for each album, .wax, and name them 0album.wax, through 6album.wax. Using the ordinal number for the day of the week, 0 - 6, build the filename string for the player.

[CODE]<html>
<head>
<script type="text/javascript">

function init(){

var today = new Date().getDay().toString();
document.Player.filename = today+'album.wax';
}

onload=init;

</script>
</head>
<body>

<Object ID="Player" WIDTH=170 HEIGHT=45
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
<PARAM NAME="BufferingTime" VALUE="10">
<PARAM NAME="AudioStream" VALUE="-1">
<PARAM NAME="Volume" VALUE="-400">
<PARAM NAME="EnableContextMenu" VALUE="0">
</Object>

</body>
</html>[/CODE]


To create the playlist files, use this template then save the info with the .wax extension.

[CODE]<ASX version ="3.0">
<Entry>
<Ref href="song1.mp3"/>
</Entry>
<Entry>
<Ref href="song2.mp3"/>
</Entry>
<Entry>
<Ref href="song3.mp3"/>
</Entry>
<Entry>
<Ref href="song4.mp3"/>
</Entry>
<Entry>
<Ref href="song5.mp3"/>
</Entry>
</ASX>[/CODE]
Copy linkTweet thisAlerts:
@konithomimoFeb 28.2006 — I agree about making a playlist for each day, but I would suggest using .m3u files and php so that you can easily have a random shuffle each day, instead of playing the playlist in the same order.

Check out this link on how to do that: [url=http://www.boutell.com/newfaq/creating/randomsongs.html]Random Songs[/url]
Copy linkTweet thisAlerts:
@SilentFire666authorMar 01.2006 — James I tried that and for some reason it doesnt work for me.
Copy linkTweet thisAlerts:
@James_GatkaMar 01.2006 — SilentFire:

It works for me. Make sure the path to your mp3 files is correct.
Copy linkTweet thisAlerts:
@SilentFire666authorMar 08.2006 — Does any one else know a way of doing this...I want the songs to play random but still have the drop down menu to choose a different song. Oh and I am using this on Xanga.
×

Success!

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

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
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,
)...