Hwang
Hwang

Reputation: 502

Positiong nested movieclips based on stage

I have multiple nested movieclip in its own different movieclip, and 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

Upvotes: 0

Views: 269

Answers (1)

alxx
alxx

Reputation: 9897

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

Upvotes: 1

Related Questions