Can you get the size of the Flash object in Actionscript?
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.
精彩评论