Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

Music Player

In this tutorial we will use some action scripts to play a song, stop, mute, and control the volume for streaming music.

You will need 2 pieces of royalty free music to use in this tutorial (wav or mp3).

Test it out on the right==>

Follow along with the music_player.fla as you go through the tutorial

 

 

Open a new movie set it to 550 x 400 pixels. Set your stage so you can see all of it.

Set the Background to White.

Click File / Import to Library / select your first song and import it.

click on the time line Layer 1 Frame 1, in your properties panel select your music from the sound pull down.

Set the Sync to Stream.

Now for the tough part the movie plays at 12 frames per second, you have to expand your movie so you can see all of the song in frames. (a 3min 45sec song will approx 2700 frames) so go as far as you can to the right in the time line sliding your timeline scroll bar all the way to the right and hit F5 do this until you no longer see the music in the time line frame. Remove any blank frames.

 

Save your movie as Song1.fla

 

File / Publish settings / click tab format and only have a check in Flash / click  Flash Tab /

there will be 2 set buttons, set them both to "MP3" / stereo to mono should be checked / "16kps" will give you a smaller sound file but quality will  suffer / Quality should be "Fast" / click "OK".

Put a check in override sound settings.

Click Publish.

 

Save and close this movie.

 

Open a new movie set it to 550 x 400 pixels. Set your stage so you can see all of it.

Set the Background to White.

Click File / Import to Library / select your second song and import it.

click on the time line Layer 1 Frame 1, in your properties panel select your music from the sound pull down.

Set the Sync to Stream.

Now for the tough part the movie plays at 12 frames per second, you have to expand your movie so you can see all of the song in frames. (a 3min 45sec song will approx 2700 frames) so go as far as you can to the right in the time line sliding your timeline scroll bar all the way to the right and hit F5 do this until you no longer see the music in the time line frame. Remove any blank frames.

 

Save your movie as Song2.fla

 

File / Publish settings / click tab format and only have a check in Flash / click  Flash Tab /

there will be 2 set buttons, set them both to "MP3" / stereo to mono should be checked / "16kps" will give you a smaller sound file but quality will  suffer / Quality should be "Fast" / click "OK".

Put a check in override sound settings.

Click Publish.

 

Save and close this movie.

 

Open a new movie set it to 300 x 75 pixels. Set your stage so you can see all of it.

Set the Background to White.

Draw a filled circle on the stage.

Click Insert  / Convert to Symbol / Call it Button 1 / Properties of a Button.

Drag a total of 6 Button 1 onto the stage.  Line them up and label them, Song 1 , Song 2 , Stop, Mute, Volume +, Volume -

 

open your Action Script panel set to Expert mode.

click on Layer 1 Frame 2 and hit F5.

Add Layer 2.

Click on Layer 2 Frame 1 / convert to key frame and  in the action panel type

 

 

Click on layer 2 Frame 2 / covert to key frame  and in the action panel type

 

 

Click on the Song 1 Button and in the action panel type

 

 

Click on the Song 2 Button and in the action panel type

 

 

Click on the Stop Button and in the action panel type

 

 

Click on the Mute Button and in the action panel type

 

 

Click on the Volume +  Button and in the action panel type

 

 

Click on the Volume - Button and in the action panel type

 

 

Save and Test your movie.

 

Prepared by Theodorb.



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2026 All Rights Reserved
Privacy and Legal