PDA

View Full Version : motion tweening nested mc


Kirl
05-01-2009, 12:35 AM
I have a very simple anti air gun made from several primitive mc's (a circle(foot) with a bunch of rectangles(barrels) inside of it). I made it from seperate parts so I could use the parent circle for rotation and motion tween the barrels for a recoil effect.

However when I try to motion tween only the barrels the whole shape is moving as well.

How else can I handle this?

I could make the entire gun a sinlge shape (with an offset center) and shape tween, but I really prefer to keep the seperate parts.

kkbbcute
05-01-2009, 05:19 AM
However when I try to motion tween only the barrels the whole shape is moving as well.

I didn't exact get this, because if you have nested everythiong correctly, this shouldn't be happening, why don't you attach your fla, I think you strcutured your MCs wrongly.

Kirl
05-01-2009, 08:44 AM
I simply put all 4 rectangles (2 barrels) in the circle (foot). I attached the fla.

I wasn't sure if the barrels needed to be instanced symbols in the library, if that isn't needed I'd rather just have a single gun instance from seperate parts.

kkbbcute
05-01-2009, 10:19 AM
Here you go, I tested it with some rough code and it worked. (I deleted the code thereafter, ask mcGun to rotate)

Kirl
05-01-2009, 12:11 PM
Thanks for the example!

Still trying to understand what went wrong though. I can see you grouped the barrels and instanced all parts, but what was the actual fix. Or what did I do wrong?

Is it necessary to instance them or was that just for clarity?

kkbbcute
05-02-2009, 04:11 AM
Just for clarity. I think your anchor point was positioned wrongly. ;)