PDA

View Full Version : [HELP]Placing external loaded swf on stage



mr_n00
November 27th, 2007, 02:36 AM
hi, folks,
I am trying to place a swf file on the stage on a specific position.
But i can't manage to figure out how... I mean, after the event is load (the onCompleteHandler function) i use the addchild, but i reckon i have to create some kind of holder of this SWF(or maybe i'm just all the way outta of it...) Well,
i tried to put the target. coordinate.... but it's no working at all...
:P
I'm kinda noob on AS.
Any help would be great....


function startLoad(imagem:String) {
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest(imagem);

mLoader.contentLoaderInfo.addEventListener(Event.C OMPLETE, onCompleteHandler);



mLoader.load(mRequest);

}

function onCompleteHandler(loadEvent:Event) {
event.target.y = 50;
event.target.x=150;

addChild(loadEvent.currentTarget.content);


}