Flash
  Home arrow Flash arrow Page 3 - Adding Video and Sound
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
FLASH

Adding Video and Sound
By: Bill Sanders
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 31
    2004-07-12

    Table of Contents:
  • Adding Video and Sound
  • Importing and Setting Sounds
  • Setting Sound Properties
  • Adding Sounds to Movies
  • Using the Sound Class
  • Project: Experimenting with Sound
  • Using Media Components
  • Working with Media Classes
  • NetStream Controls

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Adding Video and Sound - Setting Sound Properties


    (Page 3 of 9 )

    Once you have placed a sound file into the Library panel, especially if the file is not an MP3 file, you should reduce the file to the smallest possible size for effective use. Select the sound in the Library panel and click the information icon at the bottom of the Library panel to open the Sound Properties dialog box. You will see the information about the original file size. For example, the extracted sound from the AVI file showed the following information:

    44 kHz Stereo 16 bit 22.8 s 4020.8 kB

    MP3 has the best file-compression format, so selecting MP3 from the Compression drop-down menu generally offers the best file size reduction while maintaining quality. Checking the Preprocessing check box converts a stereo file to mono (only available for bit rates of 20Kbps or greater). The bit rate can be set from 8Kbps to 160Kbps. You can see that it has a major effect on the file size. For example, at 8Kbps, a 4MB file converted to MP3 is about 23KB. However, at 160Kbps, the same file is about 456KB, or 20 times as large.

    Once the settings have been made, the new file size is shown at the bottom of the Sound Properties dialog box. From the original size information of the extracted AVI file, the size now shows as follows:

    8 kbps Mono 22.8 kB, 0.6% of original

    Figure 10.3 shows how the Sound Properties dialog box appears after the adjustments have been made.

    sanders

    Figure 10.3
    Sound properties settings.

    Further settings for sound can be made in the Publish Settings dialog box. Select File, Publish Settings and click the Flash tab. Clicking the Set button for either the Audio Stream or Audio Event settings will provide setting choices similar to those found in the Sound Properties dialog box. You can then elect to override the sound settings. One primary use of overriding the settings made in the Sound Properties dialog box is for quickly testing different settings without having to reset them in the Sound Properties dialog box.

    Once you have added a sound to a movie, you can use the Edit Envelope window to change the beginning and ending position of the sound by moving the Time In and Time Out controllers. Also, you can set the left and right channels to one of the following effects:

    • Left Channel (only)

    • Right Channel (only)

    • Fade Left to Right

    • Fade Right to Left

    • Fade In

    • Fade Out

    • Custom

    You can set one of these effects by selecting it from the Effect drop-down menu in the Property Inspector or the Edit Envelope window. Using the Edit Envelope window, you set custom effects by dragging anchor points left and right and up and down. The top sound pane sets the left channel, and the bottom pane sets the right channel. Dragging the anchor points increases or decreases the volume for each channel. You can create a total of eight anchor points for each channel by clicking on the volume line. Figure 10.4 shows the Edit Envelope window with custom effect settings. The Time In controller has been moved to the right so that the sound will start playing after the first portion has been skipped. The shaded area of the sound wave shows the part of the sound that will not be played.

    sanders

    Figure 10.4
    The Edit Envelope window.

    As noted, the Edit Envelope window cannot be used until the sound has been loaded into the movie. The next section shows the different methods available for adding sounds to movies.

    This chapter is from Macromedia Flash MX Professional 2004, by Bill Sanders (Sams, 2004, ISBN: 0672326051). Check it out at your favorite bookstore today.

    Buy this book now.

     

    More Flash Articles
    More By Bill Sanders


       · Thanx for taking the time to write this verry useful tutorial.. you helped me so...
     

    FLASH ARTICLES

    - Critical Flash Vulnerability Heats Up the Web
    - More on Nonpersistent Client-Side Remote Sha...
    - Nonpersistent Client-Side Remote Shared Obje...
    - Using the Decorator Pattern for a Real Web S...
    - Using Concrete Decorator Classes
    - Delving More Deeply into the Decorator Patte...
    - The Decorator Pattern in Action
    - A Simple Decorator Pattern Example
    - Decorator Pattern
    - Organizing Frames and Layers for Flash Anima...
    - Organizing Frames and Layers
    - Using XML and ActionScript with Flex Applica...
    - Interfaces and Events with ActionScript and ...
    - Manipulating Data with ActionScript in Flex ...
    - ActionScript Syntax for Flex Applications







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT