YOUR FEEDBACK
Immo Huneke wrote: A well written article, an ingenious solution to a real problem often encountere...


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
MXDJ TOP LINKS YOU MUST CLICK ON !


Flash Animation Learning Guide (Part I)
Flash Basic 8 and Flash Professional 8 offer several ways to include animation and special effects in your document

Flash Basic 8 and Flash Professional 8 offer several ways to include animation and special effects in your document. For example, you can create tweened animations using the Timeline and Flash workspace, automated Timeline effects (by making selections in a dialog box), or ActionScript code.

To create tweened animations, you create starting and ending frames and let Flash create the animation for the frames in between. Flash varies the object's size, rotation, color, or other attributes between the starting and ending keyframes to create the appearance of movement. You can also create animation by changing the contents of successive frames in the Timeline. You can make an object move across the Stage, increase or decrease its size, change its color or shape, rotate it, and even fade in or out. Changes can occur independently of, or in concert with, other changes. For example, you can make an object rotate and fade in as it moves across the Stage. In frame-by-frame animation, you create the image in every frame.

You have several options when creating tweened animations. You can create traditional frame-by-frame animations (see the section, Creating Frame-by-Frame Animations, http://macromedia.com/devnet/flash/articles/animation_guide_09.html), motion tweens (see Creating Motion Tweens, http://macromedia.com/devnet/flash/articles/animation_guide_05.html), or shape tweens (see Creating Shape Tweens, http://macromedia.com/devnet/flash/articles/animation_guide_07.html).

Timeline effects include animated vector effects such as blur, expand, and explode. This feature makes it easy to animate an object: you can simply select the object and then select an effect and specify its parameters. With Timeline effects, you can accomplish in a few easy steps a previously time-consuming task that required more advanced knowledge of animation.

You can also create an animation by writing ActionScript code, which is sometimes called scripted animation. There are different ways you can script animation: you can write ActionScript to handle all aspects of the animation or you can use prebuilt classes and simpler code to create an animation. Using prebuilt classes makes animating with code quite easy.

Using code to create animations and effects often reduces the file size of your finished application, and can also improve the performance and consistency of the animation itself. At times, ActionScript-based animations might even reduce your workload: code can be faster to write, and it's easy to apply to many instances at once or reuse in other applications. The following sections introduce you to scripted animation fundamentals, animation using the Tween and TransitionManager classes, and integrating animation with both the Drawing API and filter classes.

Note: For more information on filter effects, see the Flash Graphic Effects Learning Guide (http://macromedia.com/devnet/flash/articles/graphic_effects_guide.html).

Requirements
To make this most of this tutorial, you need to install the following software and files: Macromedia Flash Basic 8 or Macromedia Flash Professional 8

Prerequisite Knowledge
A basic knowledge of the Flash user interface.

About Frame Rate and Animation
The frame rate, the speed at which an animation is played, is measured in number of frames per second. A frame rate that's too slow causes the animation to appear jerky; a frame rate that's too fast might negatively affect the animation or use too much of the user's computer processing power. The complexity of the animation and the speed of the computer on which the animation is being played affect the smoothness of the playback. Test your animations on a variety of machines to determine optimum frame rates.

You need to think about frame rate when working with animations because it can affect the performance of your SWF file and the computer that plays it. Setting a frame rate too high can lead to processor problems, especially when you use many assets or use ActionScript to create your animation. However, you also need to consider the frame rate setting because it affects how smoothly your animation plays.

For example, an animation set to 12 frames per second (fps) in the Property inspector plays 12 frames each second. If the document's frame rate is set to 24 fps, the animation appears to animate more smoothly than if it ran at 12 fps. However, your animation at 24 fps also plays much faster than it does at 12 fps, so the total duration (in seconds) is shorter. Therefore, if you need to make a five-second animation using a higher frame rate, it means you need to insert additional frames to fill those five seconds than at a lower frame rate‹which raises the total file size of your animation. A five-second animation at 24 fps typically has a higher file size than a five-second animation at 12 fps, depending on your assets and how you are animating the content.

Tip: Because you specify only one frame rate for the entire Flash document, it's a good idea to set this rate before you begin creating the animation.

Note: When you use an onEnterFrame event handler to create scripted animations, the animation runs at the document's frame rate, as if you created a motion tween on a timeline. An alternative to the onEnterFrame event handler is setInterval. Instead of depending on the frame rate, you call functions at a specified interval. Like onEnterFrame, the more frequently you use setInterval to call a function, the more resource-intensive the animation is on your processor.

Use the lowest possible frame rate that makes your animation appear to play smoothly at runtime because it will help reduce the strain on the end-user's processor. Try not to use a frame rate that's more than 30­40 fps; high frame rates put a lot of stress on processors. Also, do not change the appearance of the animation much, or at all, at runtime.

Finally, especially if you're working with Timeline-based animations, select a frame rate for your animation as early as possible in the development process. When you test the SWF file, check the duration and the SWF file size of your animation. The frame rate greatly affects the speed of the animation.

Creating Keyframes for Animations
A keyframe is a frame in which you define changes in the animation. When you create a frame-by-frame animation, most frames are keyframes. In a tweened animation, you define keyframes at significant points in the animation and let Flash create the contents of the frames in between. Flash displays the interpolated frames of a tweened animation as light blue or light green and with an arrow drawn between keyframes. Because Flash documents save the shapes in each keyframe, you should create keyframes only at those points in the artwork where something changes.

Keyframes are indicated in the Timeline: A keyframe with content on it is represented by a solid circle; an empty keyframe is represented by an empty circle within the frame. Subsequent frames that you add to the same layer have the same content as the keyframe.

To create a keyframe, do one of the following:

  • Select a frame in the Timeline and select Insert > Timeline > Keyframe
  • Right-click (Windows) or Control-click (Macintosh) a frame in the Timeline and select Insert Keyframe
Tweens are placed on the Timeline. You can also place code that animates instances on the Timeline. The appearance of your animation can differ, depending on the techniques you use to create your animation.

Motion tweens are indicated by a black dot at the beginning keyframe; intermediate tweened frames have a black arrow with a light blue background.

Shape tweens are indicated by a black dot at the beginning keyframe; intermediate frames have a black arrow with a light green background.

A dashed line indicates that the tween is broken or incomplete, such as when the final keyframe is missing.

A single keyframe is indicated by a black dot. Light gray frames after a single keyframe contain the same content with no changes and show a black line with a hollow rectangle at the last frame of the span.

A small a indicates that the frame has frame scripts assigned to it with the Actions panel.

A series of keyframes with a light gray background might indicate a frame-by-frame animation.

A hollow circle represents a blank keyframe, and white frames represent frames with no content. This frame begins a section with no content on the layer. For example, if you have an instance that blinks on a layer, you might insert blank keyframes where you do not want the instance to appear.

About Jen deHaan
Jen deHaan, a rather awkward and uncool Canadian, likes robots and pirates (as well as robotic pirates). Jen works on documentation at Macromedia in San Francisco. She also maintains a blog at weblogs.macromedia.com/dehaan and believes that _root and low-carb diets are unusually evil.

About Chris Georgenes
Chris Georgenes is a full-time freelance artist, animator, and all-around designer for the web, CD-ROM, and television. His clients include Pileated Pictures, LucasArts, Universal Records, Plot Developers, and AOL, among others. He maintains www.mudbubble.com as his online portfolio and www.keyframer.com as his Flash tutorial website. Chris is also a member of Team Macromedia.

YOUR FEEDBACK
Debi wrote: I have an image of fake fire that I need to make flicker....do you know of an easy way to do this? (I'm just learning Flash) A tutorial maybe?? I will go thru this and the Part II to see if I can glean some much needed knowledge....but something more specific would be good. Thanks, Debi
SYS-CON Australia News Desk wrote: Adobe Flash Basic 8 and Flash Professional 8 offer several ways to include animation and special effects in your document. For example, you can create tweened animations using the Timeline and Flash workspace, automated Timeline effects (by making selections in a dialog box), or ActionScript code.
SYS-CON Australia News Desk wrote: Adobe Flash Basic 8 and Flash Professional 8 offer several ways to include animation and special effects in your document. For example, you can create tweened animations using the Timeline and Flash workspace, automated Timeline effects (by making selections in a dialog box), or ActionScript code.
LATEST FLEX STORIES & POSTS
Curl announced the release of Curl Data Kit Data Services (CDK-DS) for enterprise developers building new applications using Adobe Flex or Flash, as well as developers upgrading existing Curl applications. This addition to the Curl Rich Internet Application (RIA) Platform is an impleme...
Adobe and Intel plan to collaborate on porting Adobe’s Flash widgetry to Intel’s Media Processor CE 3100, a way to put Flash-enhanced web content and rich Flash applications on television. The chip is bound for cable set-top boxes, Blu-ray Disc players, digital TVs and retail-conne...
Across Systems, the provider of the Across Language Server, and IAI (Institute for Applied Information Science at Saarland University) have expanded their relationship and broadened the integration of their two technologies. The direct connection of the Controlled Language Authoring To...
Cocomo adds to the existing technology in the Flash Platform and provides further choice in terms of how you build and deploy collaborative applications - it does not replace the approach provided by BlazeDS/LCDS. Whilst the Cocomo service removes the complexity associated with deploym...
Until recently Flex developers had the option of using the free, open source SDK (together with a text editor of choice) or purchasing Flex Builder, Adobe’s Eclipse-based IDE for building, debugging, profiling and deploying Flex applications. Whilst Silverlight will remain an obvious...
Adobe’s AIR for Linux, the runtime engine that supports rich Internet apps (RIAs), has caught up with its Windows and Mac siblings. The company has released AIR 1.5 for Linux, the first time the Linux desktop variant has made it as a production-grade, Adobe-supported release. And now...
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

Click Here

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE