0

I have a symbol of a person standing, he have child movieClips like hands, legs, head, body....so then if i press a button or click in the stage how do i need to change the animation instantly?

I suppose:

1) create a new movieClip that has all the same parts but animated as walking(for example) and then make something like:

if(keypressed)
{
   person.replaceSymbol(myNewAnimatedSymbol); //method that not exist
}

2) for example if my standing animation longs from 1 to 30, i can make another animation in the same line let's say from 31 to 60 where he is running and then write:

if(keypressed)
{
   person.legs.gotoAndPlay(31); //in the 60 frame he go back to 31 by using gotoAndPlay(31)
   person.hands.gotoAndPlay(31);
   person.body.gotoAndPlay(31); //and so on...
}

Can you give me an advice of which of methods I need to use? or if you have a better idea how to make it...

Hello
  • 2,247
  • 4
  • 23
  • 29

2 Answers2

0

Hm-m-m. I'd say your second approach is easier to both draw and control, especially if it'll eventually come to reskinning your MC, say your person will get dressed in a cloak that's attached to the body and arms, your "new animated symbol" will likely require a change to accommodate that clothing, while in case of one symbol you can assign its parts another look, like say person.hands.cover=clothing.handpart; person.legs.cover=clothing.legpart etc, and then the animation will contain references to cover being changed, so that correct parts of clothing will appear around all the moving parts.

In fact, you might not need separating your person into different body, hands, legs etc MCs, but instead make it so that your person's legs are a container that can hold either a bare body part (naked leg drawing) or a dressed body part (a boot, pants, etc), and animate the main part by making these containers move according to how a person should walk, stand, run, attack etc etc., so that you will have a single point to dress the entire set of your person's animations.

Vesper
  • 18,599
  • 6
  • 39
  • 61
0

It depends for example my character has around 100 animations. Putting them in a single timeline and telling them to go from this label to that label (or frame) is a huge mess to manage.

So I have 100 library items with export symbols. I keep on switching between them. This makes it easy to manage.

So, I think the question is how many animations do you have? Can you manage them in a single timelines? If you can , I'd say go with labels or frame jumps.

Both of your methods are correct and your second method would be faster because you're not adding or removing anything from the display list.

Fahim Akhter
  • 1,617
  • 5
  • 31
  • 49