// the instance name of the mp3 player is "Mp3Player_mc" // SETUP PLAYER // set player width in pixels (at least 300 px) Mp3Player_mc.width = 500; // set autoLoad (Boolean value) // if true, the mp3 file will begin loading automatically // if false, the mp3 fille will begin loading when the play button is pressed Mp3Player_mc.autoLoad = true; // set autoPlay (Boolean value, true/false) // if true, the mp3 file will start playing automatically when loaded, if autoLoad is also true // if false, the mp3 file will start playing when the play button is pressed Mp3Player_mc.autoPlay = true; // set repeat (Boolean value, true/false) // if true, after all mp3 files have played, it will start from the begining, or replay the song if only one mp3 file Mp3Player_mc.repeat = true; // set initial volume (Number between 0 and 1, where 0.5 means 50%) Mp3Player_mc.volume = 0.25; // SET FILE/FILES (uncomment the one you want to use, comment the other ones) // 01. passing an array var dat:Array = new Array(); dat.push( { url: "songs/song1.mp3", artist: "Artist 1", songname: "Song 1" } ); dat.push( { url: "songs/song2.mp3", artist: "Artist 2", songname: "Song 2" } ); dat.push( { url: "songs/song3.mp3", artist: "Artist 3", songname: "Song 3" } ); Mp3Player_mc.setData(dat); // 02. passing an object (one song), if artist and/or songname not specified, it will be taken from id3 /* var dat:Object = { url: "songs/song1.mp3", artist: "Artist 1", songname: "Song 1" }; Mp3Player_mc.setData(dat); */ // 03. passing only the url string (artist and songname will be taken from id3) /* var dat:String = "songs/song1.mp3"; Mp3Player_mc.setData(dat); */