Intro | Part 1 | Part 2 | Part 3
Flash was released in 1996 by Macromedia as a vector animation tool and has since become one of the most used pieces of web-development software in existence. In case you are curious as to it’s potential, thousands of examples are available at Newgrounds.com. Flash contains support for embedded music, videos, dynamic coding using ActionScript (Adobe’s private scripting language), and traditional animation among other things.
For today’s purposes, however all you really need to know is that Flash animations and it’s related code operate on a timeline, Flash files can run independently of a browser, and the program does really well when compressing files. This is why it is so heavily used. That said, the animator tool has several major components worth discussing. I’m not going to over them all (because I’m trying to point out that Flash is a tool that Reference Librarians can use), but I will try to be as comprehensive as possible. If you want to learn anything that I don’t discuss today then I would suggest visiting the W3C School tutorials.
The Timeline:
As mentioned earlier Flash animations aren’t created using text code. Instead, they use the same basic principle that animators do – frames. Enter the timeline… which organizes all Flash movies. If you look at the image to your left you will see that there are a number of different cells. The two black dots are called “keyframes,” the blank frames are unchanged, and the “a” sign signifies that ActionSctipt is run at that point. Keyframes denote changes in an animation from frame to frame. At first most people see
working with frames as time intensive. After all, wouldn’t it take forever to create a keyframe for every change in an animation? The answer is yes but tweening solves the problem. Basically, tweening allows you to automatically render differences between frames thus saving an animator time. I won’t cover tweens in any more detail but you need to know that they’re an integral part to Flash; they make your movies move! Remember them!
Additionally, you don’t have to use one layer on the timeline. Flash allows you to stack layers on top of one another to create the illusion that an object is in front of (or behind) another. Placing objects on different layers is good for visual changes. If you look at the gray box to your left once again (with the pencil) then you see that there is room for multiple layers.
Animation:
When working from the timeline it’s easy to create animations with Flash. First, since it uses vector graphics all material on the desktop are treated as objects. This avoids broken up content and makes it easy to group or manage the timeline. Also, when using keyframes, tweens, and other animation tools it’s easy to deal with this material. You just need to type in text, draw some pictures, import a .jpg (or something else) and use a few tweens to make things move. That’s really it…
ActionScript:
ActionScript, on the other hand, is a bit more complicated and is what makes Flash really useful. It lets you take objects and transform them into buttons, change their color according to user behavior, cause them to appear or disappear, and lots of other cool stuff. ActionScript makes Flash movies interactive instead of linear. And lets face it. Linear can be boring!
To use ActionScript all that you need to do is add code to an individual keyframe. Some examples include:
• stop(); - Stops the movie.
• play(); - Plays the movie.
• gotoAndPlay(33) - Goes to frame 33 and plays the movie.
• function buttonClick(event:MouseEvent):void
{
gotoAndStop(22);
}
22.addEventListener(MouseEvent.CLICK, buttonClick); - Sets an object to
be a button that goes to frame 22 and stops when clicked.
Don’ t worry about everything above not making sense. Just remember that if you enter this code in a certain frame (when the playhead reaches that point) the code will run and you will get a corresponding behavior and/or action.
Multimedia:
Another nice thing about recent versions of Flash is that it supports multiple multimedia formats. If you take the time to visit YouTube you’ll notice that it uses Flash and it’s own video codec to display submitted videos. MP3’s, .wav files, and other sound formats are also supported. Images can be embedded. Interestingly enough any file that Flash can open is also able to be incorporated into an animation. This flexibility turns out to be incredibly useful, and in the case of Libraries Flash offers a way to create instructional programs and animations using topical media; it can embed the content that patrons want.
Publishing:
The final thing to know about working with Flash is that it uses an atypical publishing process. I have already been mentioned that Flash can run in a stand alone player outside of a web browser, but at the the same time the commonly used file isn’t the primary document like you would suspect. As with Adobe Illustrator there is always a master file and and an output file. With Flash the source file is always larger than the published file but and published files can only be created using a source file… so there are two types: .fla’s (the source) and .swf’s (the published file).