Skip to main content
Known Participant
April 20, 2011
Question

Rotate MC with transform.matrix

  • April 20, 2011
  • 2 replies
  • 793 views

I have a number of movie clips that contain shapes. Each of these movieclips is contained in a parent movieClip (so they can all be moved at once if need be); However, the individual movieclip also have listeners that allow you to drag or rotate them. Rotation is initiated by during a hitTest over targets on the shapes.

I have had success in rotating the MCs when I use an intermediate movieclip whose x and y and been offset to simulate a registration point in the center of the shape. However, because the invisible parts of the MCs can be half again as wide or tall as the shapes, I'm having some issues with them bleeding off the edge of the screen.

Is there a way to use transform and get a smooth rotation? I can't seem to get the center point of the MC to stick and think it may have to do with the fact that a rotating MC is inside a parent MC, so its x and y positions can be negative when it is moved individually in relation to the other MCs.

Thanks for any help you can shed. I'll be happy to post the code, thought it's bit spaghetti at this point.

This topic has been closed for replies.

2 replies

Known Participant
April 26, 2011

Well, it looks like there's no easy answer to this problem. I've decided (at least with this project) to move on. Thanks for reading.

Inspiring
April 26, 2011

Well I can't really figure it out. Do you have a link to see it in action?

kglad
Community Expert
Community Expert
April 20, 2011

i don't understand the problem.  what's "bleeding of the edge of the screen"?

Known Participant
April 21, 2011

The parent movie clip extends beyond the bounds of the stage.

kglad
Community Expert
Community Expert
April 21, 2011

what does a parent have to do with this?  you're not rotating the parent, correct?