New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

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

Animating the dragged robot

From: Flash CS3 Professional Beyond the Basics

Video: Animating the dragged robot

Now we'll make an animation play when you drag the robot. If you're following along, I'm working in 07_Animated_Drag.fla in the Chapter 06 folder in the Exercise Files folder. Let's double-click the robot on the stage then go to the drag frame inside of mcRobotAll, which is on frame 21 and double-click the robot on the stage to enter its timeline. Now that we're inside mcRobotDrag, we'll create a very simple animation that looks like the robot doesn't like being dragged. And you can create any type of animation you like, but I'm going to create an animation that looks sort of like the robots getting shocked.

Animating the dragged robot

Now we'll make an animation play when you drag the robot. If you're following along, I'm working in 07_Animated_Drag.fla in the Chapter 06 folder in the Exercise Files folder. Let's double-click the robot on the stage then go to the drag frame inside of mcRobotAll, which is on frame 21 and double-click the robot on the stage to enter its timeline. Now that we're inside mcRobotDrag, we'll create a very simple animation that looks like the robot doesn't like being dragged. And you can create any type of animation you like, but I'm going to create an animation that looks sort of like the robots getting shocked.

The first going to do is undock the timeline. Click in the top right of the timeline, roll over Placement and choose Undock from Document to undock the timeline. I'm going to move the timeline on the right side of the screen. Then I'm going to press Command+2 on my keyboard, that's Ctrl+2 on the PC to zoom into the robot a little bit more. I'm going to expand the timeline down just a little bit so I can see all of my frames. And then I'm going to click and drag from frame 3 of the top layer to frame 3 of the bottom layer, and I'm going to press F6 on my keyboard to create keyframes.

And then I'm going to click and drag from frame 5 at the top layer to frame 5 in the bottom layer to select all of those frames. I'm going to press F6 on my keyboard to create more keyframes. Let's go to frame 1 and then I'm going to move and rotate all the elements of the robot slightly on this frame. So I'm going to use the Free Transform tool. With the robot's head selected, I'm going to press Q on my keyboard and then rotate the robot's head just a little bit. If you want to turn off snapping you can click the Snap to Objects button in the toolbar.

I'm going to turn off snapping here, and then just rotate the robot's head and body and neck a little bit. And you can just rotate these however you'd like, but the goal here for me, is to make the robot look like it's getting shocked. Now on frame 3, I'm going to do the same thing, but I'm going to move all the elements a little bit differently. Instead of just rotating I'm going to move some of them.

I'm making a special note not to move that far Cause this is going to be a very fast animation, and if it's a fast animation, and it's moving drastically in a very short period of time, it might be a little awkward to look at. OK, and then on frame 5 I'm going to create the final frames of animation, moving the robot's head, and neck, and body, and arms.

I'm trying to be kind of random here so that it doesn't look so much like this is a looping animation. There are frames and now let's create Motion Tweens. So what I'm going to do is click and drag from frame 1 of the top layer to frame 5 of the bottom layer and then right-click my frame selection and choose Create Motion Tween. And then with all the frames selected, I'm going hold Option on the keyboard on the Mac, or Alt on the PC, and click and drag the selection of frames to frame 6 and release my mouse button to copy the frames.

And then I'm going to reverse the frames by right-clicking or Control-clicking the frames and choosing Reverse Frames. Let's preview the animation using Command+Return or Ctrl+Enter. And drag the robot, the robot moves, and then when you drop the robot, the robot starts dancing. So now the robot animates when you drag it.

Show transcript

This video is part of

Image for Flash CS3 Professional Beyond the Basics
Flash CS3 Professional Beyond the Basics

79 video lessons · 25600 viewers

Todd Perkins
Author

 
Expand all | Collapse all
  1. 3m 30s
    1. Welcome
      1m 20s
    2. Getting the most from this training
      1m 20s
    3. Using the exercise files
      50s
  2. 15m 28s
    1. Managing digital assets
      4m 9s
    2. Creating custom keyboard shortcuts
      5m 1s
    3. Creating custom color swatches
      3m 41s
    4. Creating a custom template
      2m 37s
  3. 14m 38s
    1. Working with variables
      3m 41s
    2. Using functions
      3m 30s
    3. Working with events
      2m 11s
    4. Using event listeners
      2m 42s
    5. Working with arrays
      2m 34s
  4. 29m 41s
    1. Understanding dynamic text fields
      2m 37s
    2. Loading text from an external file
      6m 42s
    3. Reading HTML from a text field
      5m 29s
    4. Applying CSS with ActionScript
      7m 0s
    5. Applying external CSS to a text field
      7m 53s
  5. 45m 27s
    1. Masking dynamic text
      4m 59s
    2. Dragging the Scroll Bar
      7m 3s
    3. Calculating a scroll percent
      5m 20s
    4. Setting scroll boundaries
      4m 9s
    5. Connecting the ScrollBar to the text field
      2m 55s
    6. Easing the text with the ScrollBar
      4m 12s
    7. Scrolling the text with buttons
      2m 38s
    8. Animating the scrolling text with the buttons
      4m 26s
    9. Setting boundaries for the scrolling text
      4m 26s
    10. Easing the text using the buttons
      1m 37s
    11. Connecting the ScrollBar to the Scroll buttons
      3m 42s
  6. 20m 46s
    1. Organizing a complex object into layers
      1m 51s
    2. Duplicating MovieClips
      1m 29s
    3. Undocking the timeline
      1m 20s
    4. Animating a complex MovieClip
      4m 36s
    5. Creating an animated Hinge effect
      5m 13s
    6. Creating complex animations
      6m 17s
  7. 28m 1s
    1. Controlling objects with buttons
      4m 6s
    2. Understanding frame labels
      3m 25s
    3. Using buttons to navigate labeled frames
      2m 30s
    4. Nesting code within MovieClips
      5m 8s
    5. Adding sound to the application
      2m 34s
    6. Adding drag interactivity to the robot
      6m 1s
    7. Animating the dragged robot
      4m 17s
  8. 20m 3s
    1. Understanding components
      2m 30s
    2. Using components to setup a form
      3m 45s
    3. Setting up the form to send an email
      3m 38s
    4. Working with form variables
      6m 11s
    5. Skinning components
      3m 59s
  9. 27m 40s
    1. Using transparency in a video
      4m 16s
    2. Working with embedded video
      3m 38s
    3. Animating a VideoClip
      2m 53s
    4. Creating an advanced animation with video
      2m 40s
    5. Working with the bitmap data class
      3m 37s
    6. Working with the bitmap class
      1m 40s
    7. Copying the video to create a reflection
      1m 35s
    8. Reflecting the video
      2m 42s
    9. Enhancing a video reflection with a mask
      4m 39s
  10. 1h 38m
    1. Viewing the finished MP3 player
      1m 45s
    2. Understanding the project flow
      2m 52s
    3. Preparing to build the MP3 player
      5m 11s
    4. Understanding classes and packages
      5m 32s
    5. Creating the MP3 player class
      9m 59s
    6. Loading sounds from external files
      9m 20s
    7. Accessing ID3 tag information
      6m 11s
    8. Controlling sound playback with Play and Pause buttons
      11m 3s
    9. Changing tracks
      12m 1s
    10. Displaying the current volume
      9m 33s
    11. Changing the volume
      6m 40s
    12. Wiring the progress bar
      8m 4s
    13. Building the progress bar slider
      10m 4s
  11. 5m 36s
    1. Making Flash movies accessible
      1m 49s
    2. Adding a name and description to your Flash movie
      52s
    3. Accessibility and text fields
      2m 55s
  12. 12m 2s
    1. Understanding Flash Mobile
      35s
    2. Exploring Device Central
      1m 45s
    3. Updating Device Profiles
      1m 7s
    4. Creating a Flash file from Device Central
      2m 7s
    5. Creating and testing Flash Lite applications
      2m 48s
    6. Downloading the Flash Lite player for Windows Mobile
      1m 44s
    7. Getting a Flash Lite application onto your phone
      1m 56s
  13. 27s
    1. Goodbye
      27s

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

Are you sure you want to delete this note?

No

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.