- Flash Guide 2006
- Welcome to the New Flash Reference Guide
- Flash Design Guide
- Introduction To Flash
- Working with the Authoring Tool
- Working with Templates
- FreeHand for the Power User
- Creating Animation with Fireworks
- Creating Animation in Flash
- Animating Text
- Working With Layers and Keyframes
- Working With Tweens
- Quickly Add Keyframes to Tweens
- Using Animation Paths
- Using Flash's Onion Skinning Tools
- Publishing Your Animation
- Preloading for Non-Programmers
- Drawing in Flash
- Using the Library
- Organizing Animations With Storyboards
- Working With Masks
- Making 2D Look 3D
- Working With Text
- Working With Input Text Fields
- Working With Dynamic Text
- Working with Text: Advanced Text Treatment With CSS
- Working With Text: Embedding Fonts
- Flash Interactive Developer Guide
- What is an Interactive Developer?
- Creating Flash Projects
- Using Form Applications
- Working with Form Components
- Setting up a Movie for Design and Animation
- Setting up a Movie for Programming
- Working with Components
- ActionScript Fundamentals
- Intro to Working With Arrays
- Understanding The Three Types of Arrays
- Control Data Stored in Arrays
- The Eolas Solution
- Intro to Flash Player 9
- Working with Strings
- Creating ActionScript Transitions
- Working with Boolean Objects in ActionScript
- Optimizing Delivery
- Working with Numbers in ActionScript
- Working with the Number Class
- Flash Professional 9 Preview
- Adobe Takes ActionScript Open Source
- Flash Rich Media Guide
- Pros and Cons of Flash 8 Video
- Using SMIL in Flash Video 8
- Stream an MP3 Audio File to Your Flash Movie
- Flash 8
- Introduction to Flash 8
- Advanced Text Rendering
- Using BitmapData Class in Your ActionScript
- The CacheAsBitmap Property
- Bitmap Rendering Improvements and Blend Modes
- Using The ExternalInterface Class
- Using Filters
- Downloading and Uploading Files with ActionScript
- Runtime Support for GIF and PNG Files
- Garbage Collection in Flash 8
- Using Enhanced Gradients
- Using Scale 9
- Stroke Enhancements in Flash 8
- Video Support in Flash 8
- How to Create a Slideshow
- Creating Dynamic Text in Flash
- Flash 3-D–Taking Flash to the Third Dimension!
- Object Collision Detection with Flash
- Create a Quiz With The Flash Quiz Template
- Working with Flash
- Uses for Flash
- Beyond Flash
- Flash Reference Guide
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Blogs and Discussion
- Tools and Downloads
- Summary
- Flash MX Interface
- Welcome to Flash: the Designers' and Developers' Tool
- Using the Stage
- Panels, Panels Everywhere
- Using the Tools Pane
- Using the Property Inspector
- Using the Timeline Panel
- Using the Library
- Adding Interaction through the Actions Panel
- Integrating with Studio MX
- Saving and Publishing Flash Movies
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Summary
- Drawing in Flash
- Shape Tools
- Applying Color
- Informit Articles and Sample Chapters
- Tools and Downloads
- Summary
- Flash Bitmaps
- Importing Bitmaps
- Exporting Bitmap Images
- Converting Bitmap Images to Vector Illustrations
- Informit Articles and Sample Chapters
- Online Resources
- Tools and Downloads
- Summary
- Flash Text and Text Fields
- Text Types
- Input Text
- Online Resources
- Tools and Downloads
- Summary
- Using the Library
- Library Organization
- Creating Instances
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Summary
- Flash Animation
- Controlling Time
- Keyframe Animation
- Tweening
- Text Animation with Flash
- Informit Articles and Sample Chapters
- Books
- Online Resources
- Summary
- Flash Audio
- Using Audio in Flash
- Importing
- Linking to MP3
- Publishing Audio
- Streaming MP3 from the Flash Communication Server
- Informit Articles and Sample Chapters
- Online Resources
- Summary
- Video in Flash
- Video
- Flash Video
- Spark Codec
- Exporting Video
- Informit Articles and Sample Chapters
- Blog and Discussion
- Summary
- Flash Components
- Attaching Components to Movies
- Creating a Component
- Informit Articles and Sample Chapters
- Tools and Downloads
- Summary
- Exporting and Optimization
- Connecting Flash to the Internet
- Loading SWF Movies
- Sharing Fonts Between Movies
- Reusing Your ActionScripts
- Using Third-Party Tools
- Informit Articles and Sample Chapters
- Online Resources
- Tools and Downloads
- Summary
- Introduction to Design in Flash
- Introduction to Design
- Fundamental Design Concepts
- Breaking Up the Screen
- Branding
- Adding Forms to Movies
- Developing with ActionScript
- Introduction to Programming within Flash MX 2004
- Using ActionScript to Extend the Functionality of Flash
- ActionScript Fundamentals
- Using the Actions Panel
- Using the Reference Panel
- Rapidly Adding ActionScript with the Behaviors Panel
- Event Handling within ActionScript
- Timeline Events
- Triggering Events through User Interaction
- Flash MX 2004 Pro
- Summary
- Creating Interactive Movies
- Giving Users a Choice
- What it All Comes Down to
- Summary
- Testing your Flash Movies
- Naming Conventions
- Syntax Checker
- Testing your movies
- Summary
- Debugging
- Using the "Debugger"
- Reviewing ActionScript Error Codes
- Summary
- Using ActionScript to Control Your Movies
- Setting Up Your Movies for Interaction
- Making Movie Clips Behave Like Buttons
- Controlling Multiple Movie Clips
- Applying Different Types of Events to a Movie Clip
- Summary
- Using ActionScript to Control Text
- How ActionScript Can Control Text
- Using Cascading Style Sheets within Flash MX 2004 Dynamic Text Boxes
- Applying CSS formatting with ActionScript
- Where Do You Go Now?
- The Differences Between ActionScript 1 and ActionScript 2
- Working with Classes
- Which Version of the Flash Player should you use?
- What’s Next?
- Using Pre-Built Classes In Flash MX 2004
- Using a Class in ActionScript
- The List of Core Classes
- Flash Player-Specific Classes
- Summary
- Creating Your Own Classes
- Creating a Custom Class
- Working with External Data in Flash
- Why Use XML in Flash?
- Integrating Flash and XML
- Visual Elements
- Adding the ActionScript
- Future Shock
- Using Components
- Begin Using Components
- Building an Application with Components
- Gluing Components Together with ActionScript
- Summary
- Informit Articles and Sample Chapters
- Books and e-Books
- Online Resources
- Rich Internet Applications
- Introduction to Rich Internet Applications
- Why Use Flash for Building Application Solutions?
- Building Applications with Flash
- Getting Started
- Using Flash Variables
- Working with Parameters in the Object and Embed HTML Tags
- Linking data with Flashvars
- Getting Data Into Flash: Loading External SWF and JPG Files
- Why You Should Separate Your Files
- Loading Movies into Levels and Target Movie Clips
- Summary
- Loading SWF and JPG Images
- Working With XML: What is XML, and How Does it Relate to Flash?
- A Brief History of XML
- Why Structuring Your Data is Always a Good Thing
- How XML Came to Flash
- Summary
- Working with XML: Good XML vs. Bad XML
- Good Places to Start
- Writing Good XML
- XML Tools
- The Next Step - Using XML in your Flash Applications
- Working with XML: Loading XML into Flash
- Integrating Flash and XML
- Visual Elements
- ActionScript
- Future Shock
- Working with XML — Dynamically Building XML with .NET, ColdFusion, Java, and PHP
- ColdFusion
- .NET
- Java
- PHP
- Summary
- Working with XML — Web Services
- SOAP Support in Flash MX 2004
- Using Components to Bind Web Services into your Applications
- Summary
- Working with Data — Working with XML
- XML In Flash
- Writing XML In Flash
- Building Trees of Data with XML
- Working with Data: Pushing Data back to the Server with Load Vars
- Setting up the Database
- Writing the VB.NET Code
- Creating the Flash Movie
- Working with Data: Leveraging Persistent Connections
- Using XMLSocket Connections
- XMLSocket Server
- XMLSocket Security
- XMLSocket Class in Flash
- Creating a Pong Game with an XMLSocket Server
- Summary
- Flash Remoting
- What is Flash Remoting?
- Using Flash Remoting
- The Future of Flash Remoting
- Flash Remoting Links
- Working with Data: Macromedia Flex Presentation Server
- What Problem Does Flex Presentation Server Address?
- How does Flex work?
- Coding and Building Flex Applications
- Building Rich Internet Applications: Connecting Flash to a Database
- Using FlashVars
- Using LoadVars
- Loading XML
- Consuming a Web Service
- Live data connections with XMLSocket Connections
- Building Rich Internet Applications: Planning, Planning, Planning
- A Simple Plan
- Tools You Can Use
- Applying a Discipline
- Building Rich Internet Applications: Design Counts
- Do Not Be Afraid to Ask For Help
- What if You Do Not Have a Ben To Call
- Building Rich Internet Applications: Beyond the Movie Clip
- UI Components
- Data Components
- Media Components
- Manager Components
- Screen Components
- Building Rich Internet Applications: Using Macromedia Central
- What Central is All About
- Who is Using Central?
- Developing for Macromedia Central
- Next Steps You Need to Take
- Building Rich Internet Applications: Using Macromedia Flex
- Authoring with Flex
- Publishing with Flex
- Presenting the Solution: Delivering Flash Applications to the Web
- Flash's own Publishing Tools
- Using Dreamweaver
- Writing your Own HTML
- Presenting the Solution: Delivering Flash Over Non-PC Devices
- Using Macromedia's Flash Lite
- Programming for Flash Lite
- FlashCast
- Informit Articles and Sample Chapters
- Books and e-Books
- Flash for Designers: Rich Media Production
- Graphic Control in Flash
- Drawing in Flash
- Importing Vector Art
- Importing Raster
- Scripting Images
- Introduction to the Rich Media Production
- Using Video, Audio and Images in your Flash Movies
- Using SWF Flash Movies
- Using JPEG Images
- MP3 Sound Files
- Flash Video
- Using Components to Build Rich Media Solutions
- Using the Loader Component
- Using the Media Components
- Controlling Components with ActionScript
- Controlling the Loader Component
- Media Components
- Using Audio in Flash
- Linking to MP3
- ActionScript-Controlled Audio
- Volume Control
- Publishing Audio
- Summary
- Video in Flash
- Working with Video
- Controlling Video with Components
- Exporting Video
- Summary
- Choosing Which Version of Flash Communication Server to Use
- Server Requirements
- Installation
- Running Communication Server on Different OS Platforms
- Pitfalls to Watch for
- Summary
- Streaming Video
- Live Video
- Broadcast Video on Demand
- Flash Video Components
- The Communication Server MX Server Code for the VideoPlayBack Component
- Record Video with VideoRecord Communication Component
- Create A Video Conference
- Examining the VideoConferencing Component
- The Communication Server MX Server Code for the VideoConferencing Component
- Summary
- Using the Microphone and Camera Core Classes
- Microphone
- Camera
- Constructing Large Applications That Leverage Video and Audio
- Configuring the Server
- Creating the Movie
- Broadcasting
- Summary
- Informit Articles and Sample Chapters
- Books and e-Books
- Matthew's Predictions for 2006
- Matthew's Favorite Flash Books
- Matthew's Favorite Flash Web Resources
- Macromedia as Part of Adobe
- First Look: Flash Player 8
- First, the Facts
- What Macromedia Brings to the Table
- What Adobe Brings to the Table
- What the Two Companies Can Do for Each Other
- A Brief History of Flash
In past guide updates, I have explained how you can create vector and bitmap still images using Flash's sister product, Fireworks. Fireworks and Flash share a lot of features and a similar interface. If you are used to working with Flash’s design tools, then you may want to stay with Fireworks for the simple reason that you may not have the time to learn another product.
In this section of the guide, you are going to learn how to create animation with Fireworks and export the animation sequence for use on the Web as either an animated GIF or Flash movie.
Animation
There are two popular formats of animation on the Web. The most widely used is CompuServe's GIF format, but Flash is giving GIF a run for the money.
GIF animation received mainstream adoption when Netscape included it in the Navigator 3.0 browser (quickly followed by Microsoft’s Internet Explorer 3.0). Unlike JPEG images that support a photo-realistic color spectrum, GIF images support only 256 colors, the most basic color spectrum for Web browsers. However, GIF images support two key features that make them perfect for the Web: transparency and animation. You can specify that a color from the GIF palette be transparent in a Web browser. This provides the illusion of irregularly-shaped images, such as buttons. The second big win for GIF image formats is the ability to layer two or more images on top of each other to create simple animations.
Flash shares many of the same features of GIF. It can support animation, but not color transparency in the Web browser. The advantage Flash boasts is the ability to support JPEG-quality images in a more compact animation.
Using Fireworks as an animation tool
Fireworks provides a series of tools that enable an animated movie to be quickly created. The most important tool for creating animation is the Frames Inspector, shown in Figure 1.
Figure 1: The Frames Inspector
The Frames Inspector allows an animation to be created in Fireworks.
Any animation in Fireworks must have two or more frames. Frames can be added by choosing Add Frames from the Frames Properties (the small arrow in the top right-hand corner of the inspector). Choosing Add Frames opens a dialog box that asks how many frames you would like to add and where in the movie you would like them to appear. The default is for one new frame to appear directly after the current frame.
Creating an Animation
To create a new animation, Fireworks opens a new movie and sets the canvas settings to 500 by 500 pixels. Open the Frames Inspector and you’ll see just one frame. You can't do animation in just one frame; you must have at least two frames. But, before we create a second frame, let's plan what kind of animation is going to be created. Planning any type of multimedia presentation will always shorten the length of the project.
On a piece of paper, sketch out the various frames you would like to see in the animation. This is called story boarding. On the Fireworks canvas, add the first set of images that will occupy frame one. For this exercise you can use your name. Make the font size 40 points for the first frame.
From the Frames Properties menu, choose Add Frames, then add five frames. This creates five new frames directly after frame 1. You will have six frames in total.
Select Frame 2 from the Frames Inspector. Your name has disappeared. This is because the images created in frame 1 only occupy frame 1 of the movie. We have not added them to frame 2.
Select frame 1 and highlight your name. Copy and paste your name into frame 2. With frame 2 selected, change the size of the font to 36 points. Copy your name in frame 2 and paste it into frame 3 and resize the point size to 30. Repeat these steps for the remaining frames, decreasing the font size each time. You should now have six frames with your name displayed in ever-smaller point sizes.
Now that the animation has six frames, how can it be viewed? Fireworks has a set of VCR-like controls for play, stop, fast forward, and rewind. These controls are located in the bottom right-hand corner of the window. Figure 2 shows the controls.
Figure 2: VCR-like controls
These controls play and stop animations.
Click the white Play button. The animation can be stopped at any time by clicking the black, square Stop button. Use the Frame forward controls to move frame by frame through the animation.
Distribution to Frames
Creating animation frame by frame can be tedious. A faster solution is it to use a feature in Fireworks called Distribute to Frames. This allows for objects on the canvas to be created quickly into an animation. To use Distribute to Frames, the canvas must contain two or more objects.
Create a new file in Fireworks. On the stage, draw a Star. With the ALT key held down, select the star with the mouse. New copies of the star will be created each time the mouse button is released while the ALT key is held down. Create six or seven stars.
Press CTRL+A to select all of the stars that have been created. In the Frames Inspector, choose Distribute to Frames from the properties menu, as shown in Figure 3.
Figure 3: Distribute to Frames
A duplicated star shape is automatically distributed to eight frames.
The new frames are created in the order in which the original star graphics were created. In each frame will be one star. Click the Play button to view the animation.
Shared Layers
An image can be shared throughout an animation. This is great for backgrounds that must appear on every frame.
Open the Layers Inspector, add a new layer, then add a background image to this layer (it should be called Layer 2).
In the Layers Inspector, double-click Layer 2. The Layers dialog box opens, allowing the name of the layer to be changed. What is important is the "Share across frames" checkbox at the bottom, as shown in Figure 4. If this checkbox is selected, any objects in this layer will be shared throughout the animation.
Figure 4: Share Across Frames
Selecting the checkbox allows any images in this layer to be shared across all frames.
Play the animation and notice that the background is now shared throughout the animation. The only caveat with this feature is that a layer has to be shared throughout every frame of an animation. Groups of frames cannot be selected as sharing a layer.
Play that again, Sam...
The playback speed of each frame can be controlled from the Frames Inspector. Double-clicking any single frame will open the properties dialog for the frame. As shown in Figure 5, the default frame delay is 7/100 of a second.
Figure 5: Frame Delay
Changing the fraction will modify how long the frame pauses on the screen. The smaller the fraction, the shorter the time spent on the screen.
The frame delay can be manually changed. For instance, modifying the number to 100/100 will cause the frame to pause for one whole second, 1000/100 will cause the frame to pause for 10 seconds, etc.
Along the bottom of the Frames Inspector is a GIF Animation looping button. By default the animation is set to No Looping. Clicking the GIF Animation looping button opens a drop-down menu of choices for animation looping. Increasing the number of times an animation loops does not increase the size of the file.
Get it on the Web!
Animation does need some subtle modifications to allow it to be exported to the Web. This can be easily done through the use of the Optimize Inspector, shown in Figure 6.
Figure 6: Optimize Inspector
The Optimize Inspector must have the GIF settings changed to Animated GIF for the movie to play correctly after export.
With the Optimize Inspector open, choose Animated GIF from the Export File Format drop-down menu. At this point, a transparency can be applied using the "Choose type of Transparency" drop-down menu.
With the export settings confirmed, choose File > Export. Choose where on your hard drive you would like to save the animation. When the file has been saved, open your favorite Web browser, choose File > Open, and locate your new animated GIF. The animation now plays in your browser!
Your animation can also be exported from Fireworks as a Flash movie. With your animation open in Fireworks, choose File > Export Special. From here a second list of options appears. Choose Flash SWF as shown in Figure 7.
Figure 7: Flash SWF Save and properties
A Flash SWF file downloads faster than an animated GIF.
Flash has advantages over GIF. To begin with, Flash movies are generally smaller than animated GIF movies. Since more animation can be created in a smaller file, Flash files can be downloaded faster, resulting in increased user satisfaction. Flash movies can also be "loaded" into other Flash movies. This has to be done with ActionScript in Macromedia's Flash 4 or above. The end result, however, is that the graphics can be controlled with Fireworks and the scripting can be controlled by Flash, both tools doing what they do best.
Final Word
Animation can make the difference for any site. In a recent Web site competition in Wisconsin, one of the designers was surprised to see that the sites that won all leveraged animation. Used creatively and carefully, the impact of animation can make the difference between a dull site and a site with impact.