开发者

Positiong nested movieclips based on stage

I have multiple nested movieclip in its own different movieclip, and开发者_如何学Go i would like to arrange them accordingly. My idea was to use the localToGlobal function. I can get the position of the MC on stage, but how do I use the function and place the MC based on stage?

cAPos = new Point(objectA.y);
newcAPos = objectA.localToGlobal(cAPos);

cBPos = new Point(objectB.y);
newcBPos = objectB.localToGlobal(cBPos);

objectB.y=objectA.y+objectA.height <-- based on stage


If you want to position nested mc using global coordinates, try globalToLocal() instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜