Hi I used Loader to load an external swf file, and try to display it in a fixed area, like a fixed dimention sprite object. And I dont know the exact size of the swf file, I just want it to fit the fixed area. Is that possible?
code:
var loader:Loader = new Loader(); loader.load(new URLRequest("some path")); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); function completeHandler(e:Event):void { var loaderinfo:LoaderInfo = event.target as LoaderInfo; loaderinfo.content.width = 300; loaderinfo.content.height = 300; loaderinfo.content.x = 0; loaderinfo.content.y = 0;//note that this works for displaying picture, but not for swf thePanel.stage.addChild(loader); }
I want the swf to fit the panel's area, so how should I do?