How to animate

In flash there are three ways to animate an object : motion tweening, shape tweening and actionscripting it.

Motion tweening a symbol :

First, the object has to become a symbol. To test this kind of animation, let's draw a circle. Select it and hit F8. Choose Movie Clip and click ok. Then, create a new keyline on the main timeline at frame #10 (Right-click frame 10 and choose "Insert Keyframe"). Move the symbol of the circle approximately 50 pixels to the right. Right-click the first keyframe on the timeline and choose "Create Motion Tween". Hit Ctr-Enter (Movie/Test Movie) to test your animation.

Shape tweening a circle :

The second method is the easiest. Draw a circle on the stage but don't convert it into a symbol. Create a new keyframe on frame #10 and move the circle 50 pixels to the right. Click on the first keyframe and in the Properties panel set the tween method to "Shape".  Hit Ctrl-Enter to test. Same result, right?

ActionScript animation :

This is the most optimized animation technique in flash. The computer calculates where to place the object because of a little programming code that performs changes to the x and y locations on the screen. Draw a circle again and convert it to a Movie Clip (F8/Movie Clip). Right-click the Movie Clip and click on "Actions". A new panel opens and this is where programming languages like C can help a lot. But don't be scared, it's not so bad! Copy and paste the code below :

 

You noticed the circle doesn't stop moving on the 50th pixel. Here's how to make it stop on the 50th pixel. We use an "if" statement to check if we are on the 50th, if we aren't, we continue to move forward until we are.

_x is current position of the MovieClip

This method was a little more complicated and I don't recommend it to first-timers.

Other resources for actionscript can be found here :

Actionscripted Motion

FlashKit

 

back to Tutorials

  Templates ( login )
Browse Catalog
Shopping Cart (empty)
Check Out
Conditions of use
Privacy Policy
Contact
Login
  Customer Support
Help Center
Template Manuals
FAQ
Contact Support
  Partners Links
Predictive Dialers
Dedicated Hosting
Cheap Web Hosting
Firestorm Technologies
Joomla 1.5 Templates
Webmaster Forum
Voip Gateway
Toshiba Nortel Business Phones
Search Engine Optimization
Buy Links

 

Home | Templates | Conditions Of Use | Privacy Policy | Advertising | Affiliate Program | Contact

Partners : Tutorial Man | WebDesignHelper.co.uk | Website Templates | Website Templates Membership

Offering free flash templates & intros with high-quality graphics and fla files. Copyright free-flash-template.com all rights reserved. Design by ToFlash