Cole Peterson
Cole Peterson

Reputation: 184

How do I map a movieClip to another movieClip which has its rotationX modified?

I have a movie clip which I have set its rotationX property to -45. This gives the illusion of 3d. It is skinny in the back and fat in the front. I now want to add thumbnail clips on top, but can't figure out how to translate the original clip's x and y properties back to the 2d world.

any thoughts?

Upvotes: 0

Views: 78

Answers (1)

anemgyenge
anemgyenge

Reputation: 2220

Usually you can solve this problem by using the localToGlobal method of the movieclip.

Let's say m is your movieclip, and you have set

m.rotationX = -45;

Now you want to know, what point on the stage is the (10, 10) of m. For this use localToGlobal:

var point:Point = m.localToGlobal(new Point(10, 10));

And there you go. point.x and point.y will be the coordinates you can use on the stage.

Upvotes: 2

Related Questions