Hi im having some problems getting my music player to work, the idea is to drag a movie clip onto a target which automatically loads a playlist into the music player, i can get the movie clips to drag and load one playlist. The problem is that when i drag the other two it loads only the first playlist, in addition it wont start playing the playlist instantly, only when you click play next here is my code any help would be appreciated:
//// dropIt
function dropIt(event:MouseEvent):void {
event.target.stopDrag();
var theTarget:DisplayObject = targetpblock;
if (event.target.dropTarget != null && event.target.dropTarget.parent == targetpblock) {
if(event.target.name == "pblock_mc"){
XMLLoader.load(new URLRequest("cdOne.xml"));
};
if(event.target.name == "cdOne_mc"){
XMLLoader.load(new URLRequest("cdTwo.xml"));
};
if(event.target.name == "cdTwo_mc"){
XMLLoader.load(new URLRequest("cdThree.xml"));
};
}
event.target.buttonMode = false;
event.target.x = targetpblock.x;
event.target.y = targetpblock.y;
if(event.target.name == "pblock_mc"){
event.target.x = 336.35;
event.target.y = 345.95;
}
if(event.target.name == "cdOne_mc"){
event.target.x = 473.15;
event.target.y = 345.95;
}
if(event.target.name == "cdTwo_mc"){
event.target.x = 578.35;
event.target.y = 345.95;
}
}