The Web Wizard's Guide to Flash

by Michael Kay

Answers to Even-Numbered Questions

Chapter one

2. Vector-based graphics, smaller files for rich content, relatively easy to create interactive content, works well with other programs, easy to create animation and add sound, fun to use

4. A filename extension is the dot and a three- or four-letter suffix appended to a filename. It is required by most web browsers to identify files and display them properly. Flash movies are exported with the .swf extension. The work files are commonly saved with the .fla extension.

6. The Timeline is where you add frames and time to a Flash movie.

8. Like other commands, Insert Keyframe is listed under the program menus at the top of the window. To the right of the command is listed its keyboard shortcut.

10. Rulers, Guides, and Grids all aid in aligning content on the Stage. They may be visible while you work but do not appear in an exported Flash movie. The View and Hand tools also help you change the view on the Stage to help you position elements and view your work.

Chapter Two

2. Pixels are the preferred unit for measuring web-based content. They correspond to the pixels that comprise a computer display.

4. The Oval and Rectangle tools make creating simple round and rectangular shapes easy. With the Shift key depressed, you can use them to draw perfectly circular or square shapes respectively.

6. You can enlarge or rotate a selected object a few different ways. Use the Transform panel or the Modify>Transform menu in either version of Flash. In Flash 5, use the Scale or Rotate modifier along with the Arrow tool. In Flash MX, use the Free Transform tool.

8. Adobe Illustrator and other vector-based graphics program formats import well into Flash. However, it is safest to export your work from these programs in the SWF format before importing them into a Flash document. For scanned photographs, the JPEG format tends to work best.

10. To place a bitmap image into a Flash movie, use the File>Import command. You can also copy and paste an image from another open program such as Adobe Photoshop. In the Macintosh version, you can drag a file icon directly from the desktop onto the Stage.

Chapter Three

2. Creating a new keyframe for each minute change in an animation is called frame-by-frame animation.

4. A symbol is a graphic image, button, or movie clip stored in the library. Each type of symbol has spe-cific behaviors. You don’t place symbols themselves on the Stage, but representations called instances.

6. A symbol with movie clip behavior will animate independently from the main movie.

8. Create a shape tween to animate an image as it morphs into another shape.

10. Guide layers help you align work but do not appear in a published Flash SWF movie. A motion guide will aid in an animation but will also not be visible in the published movie.

Chapter Four

2. A button symbol has four frames by default: Up, Over, Down, and Hit. Like other symbols, it can have many layers.

4. Add a keyframe to the Over frame to make it different somehow from the Up frame, and a button symbol will change when the mouse moves over it.

6. Apply the getUrl action to a button and it will act like a link to another Web page. The URL link text attribute can also be used for this.

8. A movie clip symbol can play independent of the movement of the main Timeline. A graphic symbol animation will stop and start with the progression of the main Timeline. Of the two, only a movie clip symbol can be assigned a name to be targeted by an action.

10. Three paths from the orange seed to the apple seed:
../../Tree/Apple/Seed
/Tree/Apple/Seed
_level0/Tree/Apple/Seed

Chapter Five

2. It is preferable to avoid using stereo sounds in a Flash movie because they tend to add twice as much to the file size as mono sounds.

4. An event sound downloads completely before it can play, but a stream sound can play as each frame-sized chunk downloads. An event sound will play through once triggered; and a stream sound will stop when the Timeline where it is assigned stops. A stream sound must download each time it is called. An event sound only needs to download once to play multiple times in a movie.

6. You can use a stream sync sound to tie the timing of a sound to some animation. A large sound file that plays just once can be placed as a stream sound on the main Timeline; this way it can download and play gradually. There are other more specific examples but these are general descriptions.

8. The MP3 sound compression format is the best general default. Under a lot of compression it retains excellent play quality.

10. Ways to use sound more efficiently:
• Re-use the same sound in place of using many
• Loop shorter sound in place of longer ones
• Compress sounds as much as is acceptable
• When editing sounds outside of Flash, simplify them
• Use smaller sounds when possible
• Use a loading loop to ensure that all sounds are loaded to play smoothly


Chapter Six

2. Some strategies that help reduce the size of a Flash movie:
• Use symbols and keyframes strategically
• Minimize the use of bitmap images and sounds
• Maximize compression of bitmap images and sounds
• Optimize Vector Graphics

4. Factors that affect rendering speed:
• Gradient fills
• Alpha transparency
• Masks
• Intricate vector artwork
• Large bitmap images
• Long blocks of text
• Layering or animating any of these
• A movie with large dimensions
• Complex ActionScript

6. From the Bandwidth Profiler, use the Show Streaming command to simulate how a movie would
load over the Internet. You can set the download speed under the Debug menu. From the Streaming Graph in the Bandwidth Profiler, where a bar rises above the red line there may be a pause when
the movie plays.

8. The HTML options from Publish Settings allows you to scale a Flash movie within the Web page.

10. To accommodate users with the Flash 3 player, you can export the Flash SWF file in the Flash 3 format. Instead you could detect for a later version using the HTML template option and provide alternative content like a GIF image or upgrade message to those with an older player.

Chapter Seven

2. The trace() function displays the value of its parameter in the Output window when a Flash movie is tested. If it’s a literal string (in quotes) it will display that. If it’s a variable or other interpretable statement, it will display its value. This function has no apparent effect in a published SWF file, except that using it copiously will add to the file size.

4. With dot syntax, you append a method to the end of the object’s path like this:
Tree.Apple.Seed.play();

6. A variable is a storage device. You can store numerical values or text strings in a variable, modify them, and recall them.

8. Here are a few ways to increment the value of a variable “myNum:”
myNum += 4;
var myNum += 4;
myNum = myNum +4;

10. There are a few strategies for fixing errors (debugging) in ActionScript. This is based on the section titles “Writing Good Code.”
• Create a separate layer for Actions to better find problems
• Start simple. Find the errors before you add complexity.
• Use white space to make the code more readable
• Comment your code to remind you or others of why it was written the way it was.
• Use the Check Syntax command in the Actions panel. Also check the spelling and punctuation. One small typo can disable an entire script.
• Get a friend or colleague to review your code.
• Use the Test Movie feature, and possibly the Debug panel
• Use the trace() function to verify the values of variables and properties.
• Modularize the code. This is more advanced, but when you create custom functions, it’s best to create reusable pieces of code, similar in concept to symbols in the library.

Chapter Eight

2. Strengths and weaknesses of Flash. There are too many to list here. See section, “What Does Flash Offer,” for possible answers.

4. To make a Flash project more usable:
• Listen to your users
• Research the audience
• Discuss the purpose of the project with the client
• User test the project at key stages
• Show it to colleagues and friends
• Use your experience and consider usability heuristics (rules)
• Follow the tips under the section “Good Flash Practices”

6. For a serious news web site, HTML will usually work better. In reading news, the editors and readers both benefit from the more direct method. For reading longer passages of text and searching it, HTML has the advantage over Flash. Flash could be used for charts and other illustrations, but HTML for the main text of stories.

8. You should consider your audience throughout the process. At the beginning, you would look at the general needs of them such as why they would come to the particular web site. Later on, you use your audience to test specific features to see if they comprehend them and understand how to interact
with it.

10. Once a web project is published to a wide audience on the web it is quite polished. However, it can always be revised with new content and fixes. A compelling site does not just sit there on a web server. Developers and designers like you are looking it and improving it as more is learned from the audience and reevaluation.