How to align the actionscript project?

☆樱花仙子☆ 提交于 2020-01-07 04:23:06

问题


I have a pure code Actionscript 3 project in flash builder 4 and I want to align the stage. For now I have a sprite that I have set the x property to 10, but the sprites are in the middle of the screen. How to set these kind of properties in code? I suppose it's the stage object that needs to be set in some way.


回答1:


You should have a look at the Stage.align property. For example, if you want to align your Stage depending the top left corner :

stage.align = StageAlign.TOP_LEFT;

Make sure the stage is available though...



来源:https://stackoverflow.com/questions/5339322/how-to-align-the-actionscript-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!