I'm trying to get the global point (x,y)
of an object. This object is a child of a rotated parent, MovieClip
. Without rotation of the parent, it's easy to find the global point of the child, parent.localToGlobal
. However, when I'm rotating the parent, it seems that localToGlobal
returns the incorrect x,y
.
0
votes
1 Answers
0
votes
localToGlobal deals with position not transformation. You are simply using the wrong tool for the job. I'm guessing you don't want to deal with matrices but you gonna have to.
mydisplayobject.transform.pixelBounds;//global space occupied by object
mydisplayobject.transform.concatenatedMatrix//the matrix representing all combined transofrmations
parent.localToGlobal
as you say, you would usechild.localToGlobal
. - Aaron Beall