# DragnDrop mp3 player Actionscript help

**URL:** <https://forum.kirupa.com/t/dragndrop-mp3-player-actionscript-help/227515>\
**Category:** flash\
**Created:** [May 30, 2007, 11:19pm UTC](https://forum.kirupa.com/t/dragndrop-mp3-player-actionscript-help/227515 "2007-05-30T23:19:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rugget](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@rugget](https://forum.kirupa.com/u/rugget)\
**Post date:** [May 30, 2007, 11:19pm UTC](https://forum.kirupa.com/t/dragndrop-mp3-player-actionscript-help/227515/1 "2007-05-30T23:19:45Z")

</div>

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”);
