Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Animating with inverse kinematics and bones

From: Flash Professional CS5: Code Snippets and Templates in Depth

Video: Animating with inverse kinematics and bones

In Flash Professional CS4, the Flash Professional authoring environment received a new tool called the Bone tool, which is used in a style of animation known as Inverse Kinematics. In Flash Pro CS5, a new file template is included called the IK Stick Man Sample. IK stands for Inverse Kinematics and it shows an example of using the Bone tool to create a figure that walks across the screen. I'll create a new file based on this template and then test it and show you its effect.

Animating with inverse kinematics and bones

In Flash Professional CS4, the Flash Professional authoring environment received a new tool called the Bone tool, which is used in a style of animation known as Inverse Kinematics. In Flash Pro CS5, a new file template is included called the IK Stick Man Sample. IK stands for Inverse Kinematics and it shows an example of using the Bone tool to create a figure that walks across the screen. I'll create a new file based on this template and then test it and show you its effect.

It executes a continuous looping animation. The legs, the arms, the torso, and the head are all animated simultaneously and this is all done with the Bone tool and Inverse Kinematics. Let's take a look at the architecture of the presentation. Everything is being done here in the Armature_1 layer of the Timeline. There are natural shapes representing the head, body, legs, and arms and then multiple bone objects that are causing the animation to happen.

In the Armature_1 layer, there are poses represented as keyframes. Each of the poses shows a different positioning for each of the objects. A pose is somewhat like a motion tween. So when you add a new pose, Flash calculates the difference between the previous pose and the new one and causes all of the animations simply to happen. The result is the walking effect that you see here. Now let's add to this animation. I'll go to the Timeline to frame number 50.

I'll right-click on that frame in the Armature_1 layer and select Insert Pose. That creates a new keyframe. Then I'll click on the hinge that represents the front ankle and drag it forward until it looks like the figure kicked something. Then I'll click on the toe and straighten it out a little bit so it looks like the toe is pointing. Then I'll freeze the action at that point by adding a stop command into that frame. With this playhead in frame number 50, I'll go to the Code Snippets panel, to the Timeline Navigation category and add the code snippet, Stop at this Frame.

I'll close the Actions panel and Code Snippets panel and test the movie. In the final frames of the movie the figure now looks like it's kicking something. To complete this movie, I'll add something for it to kick. In the Exercise Files, in the Ch08_ SampleFiles folder, I have included a Flash file called Assets.fla. It has a picture of a soccer ball. I'll test the movie and show that the soccer ball has its own internal animation causing it to rotate counterclockwise continuously.

This is being done in the mcSoccerBall symbol where there is a Timeline and a motion tween that's causing the rotation to happen. I'll go back to scene number 1 and click on the instance of the symbol on the stage and copy it to the Clipboard. Then I'll return to my presentation with the Inverse Kinematics figure and I'm going to create a new layer. I'll right-click on the Armature layer and insert a new layer. I'll name the new layer Ball. Then I'm going to place a keyframe in frame number 20.

I'll right-click on that frame in the Ball layer and choose Insert Keyframe. Then I'll paste the object into the movie in that position. I'm going to place the object off- screen to the right, right at about the foot level of the figure. Then I'm going to create a two-part animation. I'll right-click in the Ball layer somewhere after the keyframe and choose Create Motion Tween. Then with the playhead in frame number 40, I'll move the ball so that it's in a position to be kicked.

I'll hold down the Shift key and move the ball to the side by holding the Shift key and make sure it retains its vertical position as I drag it. Then in the Timeline, I'll move the playhead to frame number 50 and I'll move the ball to the upper-right corner of the presentation just off-stage. That creates the second part of the motion tween. Then to give the ball a little bit of extra movement, I'll give it a little bit of a curve so that it appears to be a ascending at a faster rate as it goes. Now I'll play the movie.

The figure walks along, the ball rolls on to the screen, the figure kicks the ball and the ball ascends off the screen to the right. So I have shown here how to use the IK Stick Man Sample template and then I've extended and added functionality to it to create an interesting animation that combines Inverse Kinematics with motion tweens and movie clip symbols. Once again, to base your own presentation on this particular new file template, you would need to replace the natural shapes with your own photographs or other images.

I have used one external image, the soccer ball, and a prepared movie clip symbol that I've used from another Flash presentation. But once again, the goal of the sample files in the New File templates in Flash Pro CS5 is more to teach you what's possible instead of creating a basis for your own presentations. Once you've seen how you can connect natural shapes using the Bone tool and the Inverse Kinematics and then animate those objects with poses, you'll understand a little bit more about the tools that you can use to create whatever presentations you can imagine.

Show transcript

This video is part of

Expand all | Collapse all
  1. 4m 40s
    1. Welcome
      1m 32s
    2. Understanding the prerequisites
      1m 42s
    3. Using the exercise files
      1m 26s
  2. 39m 39s
    1. Using code snippets
      4m 7s
    2. Touring the Code Snippets panel
      2m 51s
    3. Adding a simple code snippet
      3m 28s
    4. Adding a complex code snippet
      7m 45s
    5. Applying code snippets to movie clip instances
      5m 25s
    6. Showing and hiding movie clip instances
      3m 20s
    7. Handling common mouse events
      8m 1s
    8. Handling keyboard events
      4m 42s
  3. 36m 21s
    1. Adding Play and Stop actions
      5m 27s
    2. Handling the enterFrame event
      8m 5s
    3. Managing multi-scene presentations
      8m 14s
    4. Adding drag and drop
      6m 33s
    5. Rotating objects
      5m 5s
    6. Fading objects
      2m 57s
  4. 27m 14s
    1. Starting and stopping sounds
      7m 24s
    2. Showing video with FLV Player and ActionScript
      5m 15s
    3. Showing video with NetStream
      4m 19s
    4. Stopping, pausing, and resuming video
      5m 19s
    5. Seeking a cue point
      4m 57s
  5. 22m 49s
    1. Loading external SWF files
      4m 50s
    2. Adding library symbol instances to the Stage
      6m 40s
    3. Loading external images
      7m 26s
    4. Loading external text
      3m 53s
  6. 14m 36s
    1. Exploring the Code Snippets XML file
      4m 12s
    2. Modifying an existing code snippet
      3m 0s
    3. Adding a custom code snippet
      3m 41s
    4. Managing code snippet categories
      3m 43s
  7. 36m 5s
    1. Understanding template types and categories
      4m 33s
    2. Creating clickable advertising presentations
      6m 10s
    3. Reusing movie clip symbols from templates
      6m 10s
    4. Replacing content in a new file template
      6m 56s
    5. Randomizing movement in movie clip symbols
      6m 1s
    6. Scripting movement in animations
      6m 15s
  8. 18m 50s
    1. Creating a photo album
      4m 38s
    2. Creating a simple slideshow presentation
      4m 13s
    3. Creating an advanced slideshow presentation
      5m 35s
    4. Creating a desktop slideshow with Adobe AIR
      4m 24s
  9. 18m 45s
    1. Counting down dates
      3m 38s
    2. Panning a landscape
      5m 51s
    3. Revealing text with masks
      3m 48s
    4. Animating with inverse kinematics and bones
      5m 28s
  10. 42s
    1. Goodbye
      42s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Flash Professional CS5: Code Snippets and Templates in Depth.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.