I´m having troubble positioning an externally loaded swf. It simply does not respond to any settings of its x
and y
values.
The swf I´m loading is a pure as3 project created in FlashDevelop where the main class extends sprite
. I´ve even tried modifying the x
and y
values afterwards using MonsterDebugger but with no luck.
The swf is loaded into a container on the right side of the stage but always end up at the top left corner. The loading is straight forward:
public var targetContainer:Sprite;
public function load(path:string):void {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, successHandler);
var movie:MovieClip = new MovieClip();
movie.addChild(loader);
targetContainer.addChild(movie);
loader.load(new UrlRequest(pathToSwf));
}
private function successHandler(e:Event):void {
//this does nothing for the one file, but affect any other swf i load
e.target.content.x = 300;
}
I don´t have this problem for other swf-files so I´m guessing it has to do with some code issue in my specific as3 project, I just can´t figure out what???
Thankful for any and every suggestion!