Welcome to Scripttease, a tutorials and script downloads site made for learning web designers.
The site is owned by Angel
and is hosted by Skye. More info?
Have you ever seen one of those little playlist thingies on someone's xanga? where there's a dropdown menu and it shows their songs? Sometimes they have play, stop, pause buttons, and sometimes they don't. The one I'm teaching you to use has these buttons and options. It's a great way to have multiple songs on your xanga.
Coding
Copy this coding into your header or webstats box, depending on where you want to put it:
Now take a look at that coding a bit. Towards the middle, you'll see this:
and this:
Javascript is all about the corresponding of different things. The first part I've shown you is the section that tells you what song you're listening to, or their titles. I left the first one blank because it is common courtesy to let someone choose what they want to listen to instead of overwhelm them with music when they get to your site.
Configuring
Now, here's how it works. Get URLs to the songs you want on your media player and fill them in accordingly. If you want to add more songs, feel free. (I'm hoping you see the pattern in how it works). If you don't, here's how to add a song:
In the top section:
In the bottom section:
songs[#]="URL OF SONG";
Replace the number sign (#) with the number that comes next in your array.
Now say that my first song is Jingle Bells. Its URL is http://www.music.com/jinglebells.mp3. Here's how I would fill it out:
Top section:
Bottom section:
songs[1]="http://www.music.com/jinglebells.mp3";
You repeat this process with any/every song you have, by inserting the title of the song and its URL in corresponding numbers. Make sure the songs match their titles, that's why they are assigned numbers so you know exactly where to put them. Make sure title number one matches song number one, and so on.
right above your song URLs, you'll see this bit of coding:
That's pretty much self explanatory. Set var playstate to 0 if you want it to play the first song on the list every time you go to your page, or if you want it to randomly pick a song, set it to 1.
And that's how you use/configure the Xanga Darkplayer.