显示中心movieClip - Flex4

时间:2011-03-06 17:22:26

标签: actionscript-3 flex flex4 flash-builder

如何创建要在屏幕中心创建的movieClip?

感谢,

http://pastebin.com/AkrW6e56

1 个答案:

答案 0 :(得分:1)

像这样:

cp.x = stage.stageWidth/2 - cp.width/2;
cp.y = stage.stageHeight/2 - cp.height/2;