stage.width和stage.stageWidth的区别 [英] Difference between stage.width and stage.stageWidth

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

问题描述

在ActionScript 3(AS3) 调用stage.width和stage.stageWidth

In actionscript 3 (as3) What is the difference between calling stage.width and stage.stageWidth

这是我记得我感到困惑,在过去(Adobe的API文档是在混淆一种艺术形式:))。认为我应该张贴在计算器。

This was something I remember I got confused about in the past (Adobe's api docs are an artform in obfuscation :) ). Thought I should post it on stackoverflow.

推荐答案

stageWidth基本上宽度播放器窗口。如果你想知道你的场景大小,你可能需要这个号码。 stage.width计算为在ActionScript中任何其他的宽度。这意味着,它是宽的边界周围的阶段的子对象框。例如empty.stage的stage.width为0。或者,如果你只有一个小广场10像素宽的场景可以说200像素宽,stageWidth是200,但stage.width为10

stageWidth is basically width of the player window. You probably need this number if you want to know size of your scene. stage.width is calculated as any other width in actionscript. This means, it is width of bounding box around child objects of the stage. For example stage.width of empty.stage is 0. Or if you have only one small square 10 px wide on scene lets say 200px wide, stageWidth is 200, but stage.width is 10

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

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