As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Flash Animation

AgelessDrifterAgelessDrifter Registered User regular
edited November 2007 in Help / Advice Forum
Here's the problem: I'm animating a stick-figure riding a skate board. The head, each leg, each arm, the body, the board, and the ground are all on separate layers. It's animated so that the board stays more or less in the same place, while the ground moves past the vantage point.

The problem I'm having is that if I tween any two parts of the body at different rates (using the Ease function), I can't get any third body part to stay linked to both of the first two at the same time.

Is there a way to anchor points of different objects (I'm not using symbols for the body parts because I need to be able to make the arms bend, etc) to points on other objects, on other layers, so that they stay together during tweening, regardless of pacing discrepancies?

I'm not explaining this very well, I know, but if anyone has a clue what I'm getting at and how to help, I'd be much obliged.

"I hate when people use quotes in their signatures." - AgelessDrifter
AgelessDrifter on

Posts

  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited November 2007
    Are you using the Dynamic Tween class in Actionscript?

    That is... tricky.

    You're basically talking about tweening a single symbol on two seperate axis. The short answer is no.

    Especially not with the Tween class.

    You might want to investigate rotation, I can't remember if Movie Clips have some sort of built-in rotation property. But even with Rotation it will take a lot of micromanagement to get it right, if at all. And it's not going to give you multi-point stuff like bending...

    You'd have to separate the body parts even further into joints and then try to attempt a _rotation adjustment. For example, upper arm and lower are would be two different symbols with separate rotation.

    Double checking, _rotation is a property of the Movie Clip class, go go go.

    P.S. you are using symbols for the body parts whether you like it or not, any Tween has to belong to at least a Graphics symbol, Flash will dynamically create them if you don't.

    Jasconius on
  • Options
    KupiKupi Registered User regular
    edited November 2007
    This is a really tricky problem, and I'm not sure that Flash has an automatic tool for sticking points of objects to other objects. You might have to delve into ActionScript and code the relationships between them, but that's no small task.

    One technique that might make it easier, but not perfect, is to change the transformation points on your objects. If you select an object with your Free Transform tool (the one selected in this picture), you'll notice a small white circle in the middle of the object. This circle is the reference point for any transformation you apply to the object, be it translation, rotation, or scale. So, if you put the transformation point on the end of one of the "limbs" and attach it at a "joint", you can take a lot of the guesswork out of keeping stuff connected. Try to define a heirarchy; have the head connect to the body at the neck, the arms to the body at the shoulders, and the legs at the end of the body. When you do a tween, make sure that everything's in the same position relative to everything else that it was when you started. (For instance, make sure that the arms are still connected to the shoulder at the same spot.)

    You're still going to have to do a lot of painful custom positioning, though, since everything's on a different layer. It's one of the inherent limitations of Flash, unless they've added something since the version I have came out (I'm using MX Professional 2004).

    Kupi on
    My favorite musical instrument is the air-raid siren.
  • Options
    AgelessDrifterAgelessDrifter Registered User regular
    edited November 2007
    Well I'm using all shape tweens at this point. Motion tweens automatically convert everything to symbols, but shape tweens haven't been for me. I assume it's because I'm using single lines for each shape, but I really know jack about Flash.

    I'm actually not using action script at all unless right-click+"create motion tween" qualifies as that. (Not saying that to be sarcastic -- I honestly don't know).

    Kupi wrote: »
    When you do a tween, make sure that everything's in the same position relative to everything else that it was when you started. (For instance, make sure that the arms are still connected to the shoulder at the same spot.)

    I've been trying to make sure I do that, and it works extremely well as long as no two objects in the tween are paced differently (eased differently) over the course of the same number of frames.

    But, for instance, I've got one portion where the head and legs are each tweened for six frames, and over the course of that tween, I did the body frame-by-frame. Now when I try to tween the arms, the shoulders won't stay connected to the body over the course of these six frames, because it's not all one tween on the body layer.

    AgelessDrifter on
    "I hate when people use quotes in their signatures." - AgelessDrifter
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited November 2007
    Well, to begin, shape tweens suck, especially for what you are doing.

    If you are going to get accurate joint/limb movement, off the top of my head, this is probably how I would look at doing it:


    Create a new symbol, draw your upper arm. Place the shoulder joint at the center of the MovieClip.

    Create another symbol, draw your lower arm, place the elbow joint at the center of the MovieClip.

    Then, you MIGHT be able to place some sort of mini-symbol, like a 1px by 1px invisible dot inside of the Upper Arm MC and use that to reference the location of it so you can place your Lower Arm elbow joint.

    I'm not sure if you can track the x and y stage location of a nested symbol, but if you could, that's how I would do it.

    By doing that you will have two separate symbols which you can rotate independently and they will automatically stick together at the appropriate place. Giving you a reasonable looking arm.

    This is just theoretical, I haven't actually tried to do it.

    Jasconius on
  • Options
    DogDog Registered User, Administrator, Vanilla Staff admin
    edited November 2007
    are you using as2 or as3?

    Unknown User on
  • Options
    SzechuanosaurusSzechuanosaurus Registered User, ClubPA regular
    edited November 2007
    Instead of having the body parts on different layers and then animating sideways/vertical motion and individual body part animation all on the same timeline, perhaps it'd work better to build the character hierarchically with movies?

    Make a movie called 'Skateboarder'

    Inside that movie, make other movies called "leftArm', 'rightArm', 'leftLeg', 'RightLeg', 'torso', 'head' etc. from a drawing of each body part.

    Now position each movie clip inside 'skateboarder' where they should be.

    Next, go inside each body part's movie clip and animate the body part on the timeline from in there in a static position. So have the arms flopping about, head lolling, legs bending and straightening etc. but don't have anything moving horizontally or vertically.

    Now climb back out to the root timeline and animate the 'skateboarder' movie clip along that timeline to have it jump, roll sideways, whatever.

    That way, it'll be a lot easier to control the link points for the limbs on the body as your keeping your shape tweens and motion tweens completely separate. I think that should work.

    Szechuanosaurus on
Sign In or Register to comment.