I'm trying to load an external swf movie then adding the ability to drag it around the stage, however whenever I try to do this I just hit a dead end. Are there any limitations on what you can set be draggable or clickable? An example of what I'm doing is below:
public function loadSwf(url:String, swfUniqueName:String)
{
var ldr:Loader = new Loader();
var url:String = "Swfs/Label.swf";
var urlReq:URLRequest = new URLRequest(url);
ldr.load(urlReq);
ldr.contentLoaderInfo.addEventListener("complete", loadCompleteHandler);
}
private function loadCompleteHandler(event):void{
var ldr = event.currentTarget;
// These are only here because I can't seem to get the drag to work
ldr.content.doubleClickEnabled = true;
ldr.content.buttonMode = true;
ldr.content.useHandCursor = true;
ldr.content.mouseEnabled = true;
ldr.content.txtLabel.mouseEnabled = true;
this.addChild(ldr.content);
ldr.content.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down);
}
mouse_down = function(event) {
trace(event.target);
}
Using the code above i can only get it to recognise a click on the movie itself if it is over a click on the textfield, but this really needs to work on any part of the movie. Any ideas?