Background Music in Flash Templates
Posted by admin in ActionScript 3, Flash, Tutorials
This tutorial shows you how to add a background music in actionscript 3.0 flash templates from flashmo.com website.
1. Import your MP3 file into the library. File >> Import >> Import to Library…
2. Right click on your imported MP3 file in the library and click on “Linkage…”.

3. Give the class name: flashmo_music and you need to uncheck export in first frame in order to avoid the problem of not displaying the preloader at first 50 percent of SWF loading.

4. Click on first frame of sound control layer. Select your music file in sound drop down box and select Stop in Sync drop down box as you see in this screen shot.

5. Remove /* from line no. 96 and */ from line no. 118 at the buttons frame of actions layer. This tutorial is based on flashmo_174_cateye template and line numbers and frame number might be varied for other flashmo templates.

6. Publish your SWF and test it. Have fun!
If you have any question or problem, you may drop a comment below. Thank you for choosing flashmo templates.








personally I would’nt bother, music on websites annoys me because I’m usually listening to music anyway and the clash is a little grating on the ear
I dislike music on websites as well. Especially when it autoplays and I have a bunch of tabs open. I really hate having to go through 10 tabs to figure out which one is making all the noise and then how to turn it off. Often I will just close all the tabs to make it stop.
hii tanx for solving my major problem
personally i find it easier to just drag and drop the music from the libary onto the stage. It plays through all pages but does not have a volume adjuster
it was a very useful for my works!
Thank you!
This blog is very useful for beginners, but using XML in flash is alot easier since you can change or add more tracks by adding or editing a few lines of code in the XML file.
I can’t say that I am a fan of music on a web site as I find them most annoying and not the type of music that I would choose, but thanks for sharing this topic and information you never know one day it could be used.
Hey man, Thanks alot! I have been scouring all over the web to look for solutions until I found your web. Keep up the good work!
THANKS ALOT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
thanks a lot, it works!
But I have one problem, I want to play my music only once, I set Repeat to 1, but alas, music sounds constantly:( What is wrong?
solved
another question: how can one control a volume of sound?
string var default_volume:Number = 0.50; does not work for me
forget it
solved
What does not liking music in websites have anything to do what so ever with the authors technical and informative tutorial? It is not a “Do you like music in websites tutorial”. Holy cow.
Hello,
I’musing yout template #147.
1) There is not sound control layer.
2) I can not find “sound drop down box”
How can I add music button to Site to stop the music?
I’m using template 173 which also has no sound control layer. When I add one and take out the comment tags, I get an error saying “1120: Access of undefined property sound_control.”
Any ideas?
thanks!
Could anyone help to disable Music loop in the templates? It is shown Repeat 1 , even if I put digit “0? it loops again again. Where is the clue for making it to play only once?
Thanks in advance!
it worked fine for me, tank you very much!
I also get the message “1120: Access of undefined property sound_control.”
And haven’t found the way to make it work !
Thanks it works awesome. at first i missed the flashmo_music when i was setting up the linkage property but then i realized i didnt put “flashmo_music” for class. It works great, thanks
my preloader doesnt work when i put this code in my action frame …. why?? any help?