Home  |  Free Templates (NEW)  |  Premium Website Templates  |  Tutorials  |  Privacy Policy  |  Link Exchange  |  Contact Us
Tutorials
Photoshop Tutorials
Flash Tutorials
3D Graphics Tutorials
Partners
Free Website Templates
Flash Templates Today
Web Sites
Free Shape
Photoshop Tutorials
Flash Tutorials
Illustrator Tutorials
HTML Tutorials
Flash Templates
Free Web Templates
Free Flash Templates
Web Templates Forum
Recommended Hosting:
Host Unlimited Domains on 1 Account
1500GB storage and 15000GB bandwidth for $6.95/mo!
Recommended Hosting:
Host Unlimited Domains on 1 Account
1500GB storage and 15000GB bandwidth for $6.95/mo!
Free Website Templates: 123456789101112131415
Preview & Download Preview & Download Preview & Download

Welcome To NewFreeTemplates.com Flash Tutorials Area - Importing MP3 sound

This tutorial demonstrates how to import, play and stop a MP3 sound using Flash Designer.

Flash file and the web page

Import and play MP3 sounds

Import the loop

  1. Launch Flash Designer and choose "Blank document" from the startup screen
  2. Choose "Movie" > "Import Sound...". Select your MP3 file and click OK. Flash Designer will show the sound in the list. Click OK to close "Sounds" dialog:

  3. Choose "Frame" > "Frame Sound". Select imported sound. Our sound is quite short so we make it play 10 times in the row. Click OK to close the dialog.

  4. Choose "Movie" > "Play Animation" to preview the file in Flash player. You should see a blank frame with the sound playing in the background. Hit "Alt+F4" to close preview.

Add some graphics

We can hear the sound. Now we are ready to add some graphics and animate it.

  1. Choose "Frame" > "Insert Symbol" to display symbols gallery. Choose "Musical Symbols" and select musical note symbol. It will appear in the design view:

  2. While the symbol remains selected choose "Item" > "Sprite". Change speed to "Fast" and click OK to confirm "Fade" effect. The symbol will fade in and out in an infinite loop.

  3. Hit F9 to preview the symbol in Flash player.

Add "Stop" button

If a user doesn't want to hear the sound add a "Stop" button.
  1. Choose "Button" tool:

  2. Click and draw the button somewhere in the right-bottom corner of the frame. While the button is selected choose "Item" > "Set Font". Decrease font size to 10. Click OK. To edit button text choose "Item" > "Edit Properties". Rename the button to "Stop Sound".

  3. To make the button working use the following ActionScript code:

    stopAllSounds();
    

  4. While the button is selected choose "Item" > "Actions" > "On Click". Select "ActionScript" and enter the code in the edit field. Click OK to confirm. Flash will execute the code when the user clicks the button.

    To prevent animation looping and starting the sound over and over define the frame as static. Choose "Frame" > "Frame Delay" and check "Stop" option.

The last thing is to export the animation.

  1. Choose "File" > "Export Flash SWF File" command. Name your swf file and click OK.
  2. Choose "File" > "Export HTML Page". The page should popup in a blank browser window.

Download Flash Designer source project: t1002.zip (300kb)

Advertisements
 
Home  |  Free Templates  |  Premium Website Templates  |  Tutorials  |  Privacy Policy  |  Contact Us
All Rights Reserved 2007-2008 by NewFreeTemplates.com