开发者

Can you get the size of the Flash object in Actionscript?

开发者 https://www.devze.com 2022-12-30 20:55 出处:网络
I\'m working with a Flash movie and I\'m trying to get the size of the player itself (i.e. the height and width Flash has to work with from the object/embed tag). As far as I 开发者_如何学运维can tell

I'm working with a Flash movie and I'm trying to get the size of the player itself (i.e. the height and width Flash has to work with from the object/embed tag). As far as I 开发者_如何学运维can tell, Flash doesn't make this available to ActionScript.

I'm able to use this.root.loaderInfo.width and this.root.loaderInfo.height to get the "intended" size of the flash movie (what's specified on export), but if the dimensions are different on the page, this isn't helpful.


Use stage.stageWidth and stage.stageHeight. You have to set stage.scaleMode to StageScaleMode.NO_SCALE for those to work.

0

精彩评论

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

关注公众号