If two movie clips instances of the same movieclip are placed on the stage and one is flipped horizontally in Flash.. Is there a way I can detect which one has been flipped horizontally in code? ScaleX seems to remain unchanged.
The MovieClip has been flipped horizontally using the Flash UI (Edit->Flip Horizontal), not via code.
I like fireeyedoy's solution more for it's compactness and simplicity but you can also do it with some bitmapdata comparison:
This is assuming that your movieclips are top-left aligned. If not then you will have to add the appropriate tx and ty values in the matrix while drawing them.
Try:
edit:
I should have accounted for the
scaleX
of the object; adjusted now.Alternatively:
edit:
Last example accidentally had calculation for vertically flipped in stead of horizontally flipped.