调用stage.width和stage.stageWidth之间的区别? [英] Difference between calling stage.width and stage.stageWidth?

查看:171
本文介绍了调用stage.width和stage.stageWidth之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在AS3是什么叫stage.width和stage.stageWidth

In as3 What is the difference between calling stage.width and stage.stageWidth

我读的地方,如果我们什么都没有在舞台上那么 stage.width值为0 但是当我什么都没有的阶段,但会发生什么动态加载在舞台上的内容?

I read somewhere that if we have nothing on stage then the value of stage.width is 0, but what happen when I have nothing on stage but loading contents dynamically on stage?

我已经试过这一点,当我已经加载的内容动态地在舞台上,然后我有

I have tried this and when i have loaded content dynamically on stage then i have got

  stage.width=value;  // where value is dynamic number

谁能解释这??
谢谢。

Can anyone explain this??
thanks.

推荐答案

按照<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html?filter_flash=cs5&filter_flashplayer=10.2&filter_air=2.6#stageWidth"相对=nofollow>的Adobe参考Stage类:

  • stage.width

指示显示对象的宽度,以像素为单位。的宽度是 基础计算的所述显示对象的内容的范围。

Indicates the width of the display object, in pixels. The width is calculated based on the bounds of the content of the display object.

所以这个属性为你添加/删除从舞台元素的不同而不同。

So this property varies as you add/remove elements from the stage.

stage.stageWidth

指定舞台的当前宽度,以像素为单位。

Specifies the current width, in pixels, of the Stage.

为您调整Flash Player窗口此属性各不相同。

This property varies as you resize the Flash Player window.

这篇关于调用stage.width和stage.stageWidth之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆