0

I have a drag-and-drop game and I'm having some trouble with the alignment of the pieces once they get dropped onto their zone. There are 12 MCs, and there are 4 columns x 3 rows of targets that are perfectly aligned. When all of movieclips are dropped, the horizontal/vertical alignment isn't perfectly even with one-another.

I know this deals with the registration point on each mc, and I'm trying to center each piece's point as much as possible using FreeTransform, but it's all visual and leaves room for error.

Is there a way to align all 12 of these pieces once they are dropped onto their target?

habib_101
  • 19
  • 6
  • The Flash IDE provides you with alignment tools http://new.tinygrab.com/7e9f7f4f70d545b861476b60de8aa4a356a7eeb34a.png You can also look at the `width` and `height` properties to determine where the true center point is and place them that way. – Marcela Mar 15 '13 at 19:51

1 Answers1

1

I'm not sure if I completely understand your question. If you're just trying to realign a clip to make sure it's exactly centered; you don't have to do it visually.

Just go into the clip hit ctrl+a to select everything and take a look at the height and width. The center point of the clip should be at:

x = -(width/2) y = -(height/2)

So you could go through each clip and manually set that.


If all your clips have the same registration point, similar algebra could be done in code to compute where they should be placed if they were centered.

It sounds like that wouldn't work because you've already moved their registration points around by hand, in which case you should probably just go in and use the previous method to hand compute their center.

Snukus
  • 1,302
  • 9
  • 17