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!
THANK ALOT! Its Working!
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?
How can i get the player to be turned off when visitors first visit the page, so they can turn it on if they wish, or leave it off if they don’t?
Hi,
i got follwing problem by changing the music in 210 carousel gallery:
when i import it and try set linkage the error comes up that i got to set a class name thats unused or unique. It wont accept flashmo_music.
Help
Hello Jürgen, You need to delete “Red Carpet” sound item inside “1. layout” folder in the library first. Then, you can make “flashmo_music” class name for your own sound item.
Hey admin,
i can create it now, but it still wont work.
Also i cant find the “/*” in any line of the actions layer.
And if i save it like this the whole clip is like a speedclip
Hi, can´t give a class name because linkeage option won´t apear on my right click.
Awesome man…thank you very much …it helped very much!!!!!
I have not published the site yet although I’m excited to get it out there. Thank you so much for your templates. I am not a Web Designer and it is very nice to have such marvelous work available. I do have 2 questions. How do I disable the music all together? and I’m using #214 “Acordian” How would I drop it to only 4 pages?
I followed instructions very close. About other stuff I noticed that many including myself probably have a slitghtly different version of flash than the one in this tutorial.
I am editing flashmo_196_square. My music button is not working no animation no music, help!
Sincerely,
Andrew
Nevermind found my mistake, now its working fine!
Thanks for this guide.
Hi! I am using Flash CS5 actionscript 3 but cannot find item linkage when I rightclicked on sound file (mp3). Clicking on properties, I don’t find class or the other items you displayed but a window with other items like update, import, edit etc. I inserted in the blank string flashmo_music. Then, when I go to first frame of sound control, the below window with properties does not appear,but found it on the right of desktop; I inserted the clip in the sound drop down box and selected Stop in Sync drop down box . Then cancelled “/*” and the opposite. Tested movie but it does not work (speed display of all images and a message saying that there is a problem with flashmo_music. Can you please help me?
Solved! The item linkage was in the advanced option. It works perfectly!
Wao! Thanx yes, it works! This solution works nicely. Thanx again.