• home
  • forum
  • my
  • kt
  • download
  • Sound In Flash

    Author: 2007-06-09 17:48:59 From:

    Sound is one of the key senses. It adds depth, feeling and emotion to what is being viewed. Flash enables designers to apply this level of engagement. This lesson will cover how to add sound to your Flash Movies.

    Topic Outline:

    • What is Sound
    • Adding Sound to Flash Movies

    Learning Objectives:

    • Understanding the different types of sound
    • Optimizing Sound in Flash
    • Editing Sound in Flash

    Time Estimate:

    • 1 hour

    Glossary Terms:

    • Modifiers - A collection of utilities that effect a tools behavior
    • Objects - Elements you place in the stage. These can be shapes, text or scripts.
    • Line - The line is the outermost edge of a shape, image or text
    • Fill - The fill color occupies the internal space of a shape or text

    Sound does change how a user interacts with a Flash movie. A rewarding chime-sound as a user clicks on a correct button is very effective.

    Sound is imported to Flash as either a MP3, .wav (Windows) or .aiff (Macintosh) sound file. Sound cannot be edited directly in Flash. An audio editing program will have to be used to create any sound effects.

    When exporting Flash files to the web an option can be selected to convert all sounds to .mp3 format. MP3 is the most popular sound compression format currently available. The success of this format is driven by an MP3 file being up to 1/10th of the file size from the original file. This is a huge gain for Flash designers. Now a rich audio file can be used without significantly jeopardizing down load time.

    Currently Flash does not import .mp3 or any other audio file above and beyond those highlighted above.


    To add a sound to a Flash movie select File menu and choose import:



    The import dialog box pops up. Search for the WAV sound file types.



    Navigate to a folder that contains .wav files.



    Select a file and Flash will import that file into the Library.



    The sound file is displayed in the library with a small speaker icon. The sound can be played from the Library with the play button.

    Sounds can be re-used without increasing the file size of the Flash movie.

    Sounds can be played into different formats within a Flash movie: Event Driven and Streamed.

    An Event Driven sound is a sound that is started due to an action in the Flash movie. This could be a mouse button being clicked, looped music clips or an ActionScript calling for a movie.

    • Event Driven sound effects have to be completely downloaded before they can play. Large sound files will take longer to download. Bear in mind the download time when creating complex and long sound effects. The great thing is that when a sound file is completely downloaded it can be re-used throughout the movie repeatedly without needing a second download.

    • When an Event Driven sound begins to play it will continue to play until it is finished. This means that if a user starts a sound playing and then clicks a button in the movie to go to a different section of the movie, the sound will continue to play until it is finished.

    • An Event Driven sound can only be inserted in a single frame, irregardless of how long the sound is.

    Streamed sound is placed directly into a layer. Unlike Event Driven sound, a Streamed sound file begins to play as it is downloading. The benefit is that large files begin playing after only a small portion of the file is downloaded. Once downloaded, the file can be re-used as an Event Driven sound.

    In addition, you can control where a Streamed sound file plays in the timeline. A streamed sound file can be added to the timeline the same way as a symbol can. If the sound file is inserted at six frames into the movie, it will not play until frame 6 is reached.

    The frame shows a graphical representation of the sound playing. This can be used to line up other graphics with the sound.

    Sound files can be modified in Flash. Double click on any sound file in a layer and that instance of the file can be modified.

    The sound tab for the Frame Properties opens to show the current sound being used. Any of the sounds in the library can be selected from "Sound" dropdown and modified. Along side the sound being modified is a description of the original sound file. In the example on the previous page the sound file "Drumroll.wav" is broadcasting at 11kHz, the sound is Mono, is sample rate of 8 Bit and is 19.4 kB in size. This sound is not CD quality. To have CD quality sound the sample rate must be 44kHz. Often, lower broadcast levels can have the same effect as higher one, plus create much smaller export files.

    The two graphical sound waves visually represent the right and left speaker. The top graphic is the right speaker and the bottom graphic is the left speaker. Across the bottom of each graphic is a scroll bar that can be dragged to any point of the sound file. The default measurement for the sound clip is in seconds. This can be changed to frames by selecting the frame icon.

    The sound level can be controlled by the Envelope handles:

    Dragging the line down will cause the level of the sound to decrease in volume.

    Undulation in volume level can be created by clicking at different points in the Envelope line to add additional Envelope Handles. This allows for effects such as fade in and out.

    Alongside the graphical display of the sound are the Effects. Effects modify how the sound is broadcast through the computer speakers. There are seven effects:

    The default is to have no effects, "None", to play the sound as imported. Selecting Left Channel and Right Channel will force the sound to play through either the left or right speaker. "Fade to Left to Right" and "Fade to Right to Left" will transition the sound from one speak to the other. Fade In and Fade Out will transition the sound clip in from silence to normal sound levels and vice versa.

    Sound can "Sync" with the action in the movie. Selecting the Sync drop down offers four choices:

    Event will force that a sound is played from beginning to end when the frame playing it is reached.
    Selecting Start will ensure that two instances of a sound file are not playing simultaneously.
    Stop will force an instance of Sound file not to play.
    Stream will sync the sound file with the animation so that it animation and sound file play in time with each other.

    Finally, sound can be looped any number of times. This works well for background sound tracks.

    Sound can be exported at different compression levels. To maximize the compression for a given sound double click on the sound file in the Library. This will open the properties for that file.

    The Test button will play the sound file.

    Import will replace the sound file with a new sound file selected from the hard drive.

    The Export Settings define how the file will be saved. There are four settings:

    • Default
    • ADPCM
    • MP3
    • RAW

    The default compression setting is to keep the file as is. Nothing is changed. The RAW setting is similar with the exception that a file can be saved at different kHz settings.

    The two true compression types are ADPCM and MP3. ADPCM is best used for short sound clips whereas MP3 is good for longer sound files.

    ADPCM

    Selecting ADPCM provides the following options:

    Changing the Sample Rate and the ADPCM bits modifies the size of the file and it's sound quality. Change the settings and select "Test" to hear new, compressed sound. Experimenting with these settings can significantly reduce the file size of the original sound file. The bottom line describes how much smaller the new file is to the original. In this instance, the file is 25% of the original file size.


    MP3

    MP3 has similar compression options.

    Bit Rate is similar to ADPCM Sample Rate. As a rule of thumb 128 kbps is equivalent to 44kHz.


    Sound adds rich depth to any movie.

    Utilizing streaming and on-demand download assures the most

    » Level Basic

    Added: : 2000-12-09
    Rating: 6.70 Votes: 176
    Hits: 2092
    » Author
    Freelance Writer and Instructor
    » Download
    Download the files used in this tutorial.
    Download (69 kb)

    discuss this topic to forum

    relation tutorial

    No information

    Category

      3D (36)
      Math Physics (18)
      3rd Party (10)
      Navigation (70)
      Actionscripting (228)
      Optimization (17)
      Animation (166)
      Projector (11)
      Audio (54)
      Special Effects (170)
      Backend (26)
      Text Effects (92)
      Drawing (34)
      Tips and Techniques (58)
      Dynamic Content (38)
      Tricks (8)
      Games (114)
      Utilities (24)
      Getting Started (99)
      Video (59)
      Interactivity (48)
      Web Design (37)

    New

    Hot