Loading swf in flash
I get more information around开发者_如何学编程 in internet about how it do, but I have problem how right including in my "flash load external swf" the "as3 xml full stream gallery" . And how to focus gallery in centre.
Loading is easy enough:
var loader:Loader = new Loader();
loader.load(new URLRequest("myFlashThing.swf"));
addChild(loader);
I'm not sure what you mean by "how focus gallery in center" but if you want to center it:
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
function onLoad(evt:Event):void{
loader.x = stage.stageWidth / 2 - loader.content.width / 2;
loader.y = stage.stageHeight / 2 - loader.content.height / 2;
}
(untested, but its something along those lines)
精彩评论