GDT 260 Animation for the Web: Winter 2003
Notes & Handouts March 11
Sound
Key to sound in Flash: optimization, reuse, and separation from main content.
Getting Sounds
- Create audio yourself
- Download from royalty-free site/ royalty-free CD’s
Rules of thumb for audio
- Start with highest quality you can get—optimize in Flash. CD quality: 44 khz 16 bit.
- Loop soundtrack elements whenever possible
Importing Sounds into Flash
Flash can import many audio formats: AIFF, WAV, MP3, etc.
File > Import, choose "All Sound Formats". Sounds will appear in library once imported
Optimizing Sounds
- Double-click on sound in library to open sound properties window
- From Compression drop-down, choose a format
- Click Test to hear the results
- Look at compression info at bottom of screen to see file size
- Change options for chosen format and test to compare results: lower bitrates yield smaller file size, lower quality
- Choose the compression settings that yield best compromise between quality and file size
Flash Sound Formats
- ADPCM: backwards compatible with Flash 3. Sometimes good for short sounds—worth a try
- MP3: generally best compression/ sound quality. Lossy: discards audio data, like jpeg. Recompressing mp3’s results in increasingly poor sound quality
- RAW: No compression, other than resampling lower. Uncompressed audio sounds great, but HUGE file size
- Speech: Best for voiceovers, which have a much smaller audio range than music
Working with Sound in Flash
To attach sound to timeline: insert keyframe, select it, and choose a sound from the drop-down menu on the sound palette
Sound Options
Effect
From the Effects menu on Sound palette, choose an effect, click “Edit…”. Edit Envelope window opens
Edit Envelope window controls volume/ mix of stereo channels.
- Top is left, bottom, right
- Scale between is time or frame (switch at bottom right)
- Line with white handles shows volume. Top of each window is highest, bottom is silent. White handles can be dragged, to cause the sound to change volume on one side or the other.
- Add up to 8 handles by clicking on line. Handles are added to both top and bottom (left and right) in same spot
Synch
- Event: Flash treats sounds like movie clip—independent of timeline. The start of the sound is synched with the keyframe it appears on, but there’s no guarantee it will end on the keyframe you think it will. Sound is downloaded once and reused
- Stream: Sound is tied to timeline, so it stays synched up, but it can cause movie to pause or to drop frames. Sound streams from internet, not reused. Flash loads about 5 seconds worth, starts playing.
- Start: Like event, but prevents same sound from playing more than once at any given time
- Stop: Stops the sound.
Looping
- 0—sound plays once
- To make a sound repeat essentially forever, choose a very high number, like 999
Flash Audio Oddities
- Sounds sometimes don’t play in frame one. Start audio on frame 5
- Event sounds don’t always play long enough or start at the right time. The book suggests adding a one frame streaming sound at frame 4, turning the volume all the way down with the Edit Envelope window.
- Event are only synched to the frame they start on. Don’t loop important Event sounds; add it to a keyframe every time it should repeat OR in publish settings choose “Auto-High” OR lower the frame rate.
- Test the movie on a slow computer to make sure everything keeps up.
Soundtracks
It’s a good idea to keep soundtracks as a separate .fla from your main content. That way, you can use a loadMovie action to load the soundtrack in the background after the content has loaded. That way, it doesn't interefere with someone getting at your information.
To create a soundtrack:
- Create 3 new layers, named “comments,” “kicker,” and the name of the sound
- Add a keyframe in the kicker layer and attach your kicker sound
- Add a blank keyframe right after the kicker
- Insert a keyframe on your sound layer at the frame after the kicker
- Attach the sound to the keyframe
- Extend the frames as long as the waveform shows up in the timeline
- Add a label to a comments layer, so you can tell what's going on
- Make any volume adjustments
- Add a layer for each new sound
Most pop/ rock consists of 4 bar patterns. The samples from the book are 2 bars, so double each one up.
Video
Video that has been edited in other software can be imported into Flash. Flash doesn’t have video editing capabilities—it can play it back and it can treat it like any other symbol.
Example: PBS American Experience Zoot Suit Culture
Formats
- Quicktime 4 required for import (mac or Windows)
- AVI
- DV
- MPG
- MOV
- DirectX 7 required for import (Windows only)
- AVI
- MPG
- WMV
- ASF
Additionally, certain codecs (compression-decompression methods) will only work if you have the codec installed on your machine. Some codecs can be downloaded for free, some are quite expensive.
Using Video in Flash
COMPRESS! COMPRESS! COMPRESS!
Importing
File > Import
Options
- Embed vs. Link: Link only works for Quicktime exported flash movies. Always choose “Embed.”
- Quality: The image quality of the movie. Higher number > higher quality, larger file size. Smaller number > lower quality, smaller file size.
- Keyframe Interval: The number of video frames between complete video frames (keyframes). The other frames have only the information that changes at that frame. High number > small file size, poor performance on slow computers. Low number > large file size, good performance on slow machines.
- Scale: The scale of the imported video.
- Synchronize: If the frame rate of the video is higher than the frame rate of the flash movie, this option will drop video frames to synch the video frames to the flash frames. Otherwise, you can specify the proportion of Video frames to Flash frames
- Import Audio: Import the audio track or not. Not all compression methods will provide an audio track the flash can import.
Flash will ask if you want to extend the timeline to match your video clip once it’s imported.
Working with Video
You can convert the video clip into any type of symbol, nest it within other symbols, apply any type of color effect to it, and control it with actionscript. The video timeline is tied to the timeline that it’s sitting on, so if the timeline is playing, the will be playing, too.