|
![]() |
Course Course |
Multimedia
The following links take you to the resources on this page.
The Power of MultimediaFlash developers shouldn't view audio, video, and visual elements as "extras" to be added as time permits. Instead, they should be considered essential components of effective informational or instructional experiences. Each user has a different learning style and preferences for particular presentation formats and styles. Rather than focusing projects on one type of end user, provide a variety of resources, tools, and experiences to address the diversity of interests. |
|
Sound in FlashFrom music to sound effects, there are many different ways to incorporate audio elements into your Flash projects. You can play individual sounds from the Timeline, synchronize sounds to animation, and loop sounds so they play continuously.
Although Flash contains many tools for integrating sound, there’s no way to record audio in Flash. Instead, you’ll need to record your own sounds with other software or locate existing audio files. Sounds can come from many sources. You can use public domain sounds you locate on the web, sounds from clipart CDs, or sounds you record yourself. Developers can import sounds, sync sounds with animated sequences, control volume, loop elements, and provide sound controls. Like graphics, sounds can be imported with the Flash Library and used multiple times in a project. As you explore sounds, you’ll notice that there are three characteristics that will impact quality: sample rate, bit rate, and channels. Sample Rate. Digital sounds are measured in kilohertz (kHz). Unless you need super high quality, you don’t need more than 22 kHz. Bit Rate. Sometimes called bit resolution, 8-bit sound is fine for most projects. Channels. Mono is one channel and stereo is two channels. Mono is fine for most projects. Sounds are imported into the Flash Library. Developers can import *.wav, *.aiff, and *.mp3 audio file formats into Flash projects. You’ll have the best luck with the *.mp3 format.
There are four sync sounds you can set: event, start, stop, and stream. An event sound is downloaded before it starts and plays until an event stops it such as a mouse click or Timeline action. It may loop around and play more than once to match the animation. Event sounds are often used for roll-over buttons. It’s a good idea to use event sounds in most situations unless you need to synchronize your animation. A start sound is the same as event sound except they only play through once. A stop sound is used to stop a sound from playing. For example, you could turn off the background sound when narration begins. A stream sound begins playing as soon as it begins downloading. It will sync the sounds with the animations. For most projects, use the properties panel to control the sound. However for more complex project, you may need to use ActionScripts. In most cases, you’ll use either use attachSound or loadSound. attachSound(). This method asks you to call an object from your Library and create a internal link to the sound. These sounds are embedded in the *.swf file. loadSound(). When using this method, you call an external sound file that must be loaded into the movie. Keep in mind that this sound must be available through the URL in order to work. This approach works best when you access a file that you own and control. Let's explore a few cool techniques for using sounds in Flash. These were suggested by students in the Flash class: Stopping Sounds. It's useful to be able to stop sounds. Many students have found the following two commands useful: stopAllSounds(); and gotoAndStop(1);. - Any students, Spring 2006 Toggle Mute. You can change the buttons and/or flow of the Timeline so that the Stop button doesn't cause the sound to start again. One way to do it is to change the Mute button to an on/off switch. Then the sound can be turned on or off independent of the state of the animation. Here are links to a simple toggle switch that turns sound on and off. In this case, banjo music: Soundtoggle (.swf) and (.fla) You would need to insert a keyframe before your loop in order to initialize variables and start with the sound on. Also, in order to use an Actionscript to call objects from the Library, you need to set up the linkage for those objects. For example, you would need to right click on the sound file and select Linkage. Then select Export for Actionscript. (Click OK). Also once you've inserted a keyframe before the main loop, you would need to make sure that your buttons are changed accordingly. To do this, you could name a frame "Start". Then the Stop and Start buttons could go to "Start" instead of "1." You could also insert a new layer Actions and put the initialization Actionscript in the first frame. (Put a blank keyframe in the second frame so that the initialization only happens once when the program starts). The Actionscript that is in the soundtoggle file could be used in the first frame of the actions layer and on the Mute button object (which would really become a toggle switch). The only thing that would have to be changed is the name of the sound. Also, see Chun and Garraffo's Macromedia Flash Advanced for Windows and Macintosh for more info and examples. - J. Heaphey, Spring 2006 Attaching Sound. Avoid putting sounds directly on buttons by using ActionScripts. Once your sounds are imported, right-click on each one and select Linkage. Select Export for ActionScript, click OK. Make sure that you give your buttons instance names in the property panel - like stripes_btn. Once you've provided linkage for all of the sounds and given instance names to all of the buttons, you're ready to write the ActionScript. Create a new layer called actions and put the Actionscript in the first frame such as laugh_sound=new Sound(); //stop this and other sounds //play laugh_sound Check out the TwoSound (swf and fla) example. - J. Heaphey, Spring 2006 Stop Sounds & Play Sound. You sometimes want to stop all sounds and start a new sound. Upon reaching a frame you'll need to stop all other sounds and play the audio clip “songfile”. Just make sure that you set the Linkage of the audio file by right-clicking on the audio file and choosing “Linkage”. Select “Export for ActionScript” and click OK. stop(); The parameters for song.start tell the program to play the file with a 0 second offset and to loop it 999 times. Check out the MusicOnFrames (swf and fla) example. - J. Heaphey, Spring 2006 |
||
|
||
Video in FlashVideo is an exciting way to add movement and audio to your projects. Flash can use many different video formats. You can use Flash to create or import Flash Video (.flv) files. If you have QuickTime installed on your computer, you can import files in *.avi, *.mpg, *.mov, and *.dv formats. Short videos can easily be added to any Flash project. Try to keep video down to about 10 seconds if you plan to play them off the web. If you want longer videos, consider streaming video from the web. Unfortunately, the videos will need to be served from a web server that has this option. You can connect to an .flv video from your .swf file to play video from a web server. This is a good idea if you have a long video because it will start playing while it’s still downloading the file. You can also stream video from a specialized Flash video server.
Let's explore a few cool techniques for using Movies in Flash. These were suggested by students in the Flash class: Adjust Movie Clip Settings. Use the kirupa website for suggestions on simple video editing in Flash. - P. Slater, Spring 2006
|
||
|
||
|
||
Adding Multimedia to Flash ProjectsThe options for multimedia projects are endless. The biggest problem you're likely to face when working with media elements are space and pacing. Space. When you start integrating sounds and video, your files will become very large. When you delete elements, you may not see a change in your file size. We suggest that you SAVE AS occasionally. You'll want to change the file name. This is also a reminder to keep backup copies of your work. This will organize and compress the data in your file to save space and reduce the file size. If your project becomes very large, consider breaking it up into smaller files that can be connected together. Pacing. Another common concern is getting your audio and visual elements to work together. You may need to length or shorten audio elements. Also consider ways of changing the speed of your presentation through adjustments in the number of frames or use of stops. Keep your project as short or "tight" as possible, while still conveying your message. You can sometimes work out a sound problem using the "Sync" option. You'll need to click on the frame that contains the sound file and examine at the Properties panel. Change the Sync from Event to Stream. When sounds are in the Stream mode, they will automatically stop when the next keyframe is reached. Try techniques such as pausing. The following script is an example that can be used for pausing for a particular length of time (M. Witt, Spring 2006): pauseDuration = 5*1000;
|
||
Learn MoreSounds
Video
Visual Elements
|
| All Rights Reserved. Created 10/05. Updated 5/08. Feedback |