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.
精彩评论