JAVASCRIPT CONTROL EXAMPLES

Here's an example of all the javascript interactions the player currently support. Note that javascript controls only work from Flash version 8 and only online, not locally! In order to make them work, make sure you have copied the javascript functions in the header of this page. Also make sure that, through SWFObject or the embed tag, you've given the SWF an ID that is similar to the id used in the javascripts (in this example it is "mpl").

Get the Flash Player to see this movie.

SEND COMMANDS

LIST OF FLASHVARS

1. The MP3 file informations can be passed in two ways...
you can pass the file informations as the comma seperate filepaths under the FlashVar 'file' like the following...
file=track1.mp3,track2.mp3,track3.mp3,track4.mp3,track5.mp3,track6.mp3

OR

you can prepare a XML file, containing the all the mp3 file paths and other informations and can pass that xml filepath under the FlashVar 'file' like the following...
file = playlist.xml [view the sample xml]

If you pass comma seperated file lists then the Track name and Artist name will be displayed as stored in the ID3 tag [ID3 version 1 and 2 supported] and in case of XML data input, it will read the informations as stored in the XML file.

2. To play the songs automatically the 'autoplay' FlashVar is used. If the FlashVar 'autoplay=true' then the player will start playing automatically on launch.

3. The 'volume' FlashVar is used to set the initial volume level of the player. It can be set in a range of 0 to 100. The default is 80 (if there is no FlashVar named 'volume').

4. The player background color can be set with the FlashVar 'bgcolor'. You can pass Hex value of the color with or without the # preface, like the following...
bgcolor = #E1EAEC or bgcolor = E1EAEC
Default bgcolor value is white (#FFFFFF).

5. All the other object's color except the player background color can be set with the FlashVar 'buttoncolor'. You can pass Hex value of the color with or without the # preface, like the following...
buttoncolor = #003366 orbuttoncolor = 003366
Default buttoncolor value is white (#000000).



This player is developed with Flash using Actions Script 2.0 and exported for Flash Version 8.0 because to make the player receiving commands from the javascript interface, we have used Flashe's External Interface class, which is not compatible with the flash player version below 8.0