I want to have this mp3 player to display the songs in 2 rows instead of 1 that I have now. I want the player to display 4 songs, 2 in each row. song_mc is the movie clip that songs are loaded into. Any help is appreciated.
stop();
//
var theSong:Sound = new Sound(this);
var currentSong:MovieClip = undefined;
//
var myMusic:XML = new XML();
myMusic.ignoreWhite = true;
myMusic.onLoad = function(success) {
if (success) {
var myArr:Array = this.firstChild.childNodes;
for (var i = 0; i < myArr.length; i++) {
var mySong:MovieClip = attachMovie(“song_mc”, “s”, i + 99, {_x:0, _y:200 + (i * 80)});
mySong.songTitle_txt.text = myArr*.firstChild.firstChild;
mySong._mp3 = myArr*.firstChild.nextSibling.firstChild;
mySong.orgX = mySong._x;
mySong.orgY = mySong._y;
mySong.onPress = function() {
this.startDrag();
this.onMouseMove = updateAfterEvent;
};
mySong.onRelease = mySong.onReleaseOutside = function () {
this.stopDrag();
delete this.onMouseMove;
if (eval(this._droptarget) == this._parent.player_mc) {
if (currentSong != undefined) {
currentSong._x = currentSong.orgX;
currentSong._y = currentSong.orgY;
currentSong._visible = true;
}
currentSong = this;
this._visible = false;
playSong(this._mp3);
} else {
this._x = this.orgX;
this._y = this.orgY;
}
};
}
}
};
//
function playSong(song:String):Void {
theSong.loadSound(song, true);
}
//
myMusic.load(“music.xml”);