开发者

Flex/Actionscript 3 dynamic width/height change

开发者 https://www.devze.com 2023-01-14 07:51 出处:网络
Is it possible to dynamically (not in the project\'s options) change the dimensions of the stage by using ActionScript 3?

Is it possible to dynamically (not in the project's options) change the dimensions of the stage by using ActionScript 3? I'd want to create a 400x300px loader, but I also want it to load animations that have bigger or smaller dimensions. I would then change the width and heigh开发者_如何学Got of the loader to make the loaded animations fit well.

Is there any way to do that?

Thanks.


<YourLoaderOrContainerWithAnimation top="0" bottom="0" left="0" right="0" width="100%" height="100%" minWidth="400" minHeight="300" maxWidth="400" maxHeight="300"/>

first of all use code.google.com/p/swfobject instead of embed tag, and yes you can directly change sizes like this.width=width_from_js; but as I remember swfobject will allow you to do this in raw js, just check it and let us know. :) thanks

0

精彩评论

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

关注公众号