开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜