The NEW Build Your Own Arcade Controls
Main => Artwork => Topic started by: Floyd10 on June 28, 2004, 04:33:54 pm
-
I'm going to have a menu screen with music looped in the background. It IS it's own scene, and I want to know how to loop the music. Thank you
-
Man, it;s been about 2 years since I worked with flash, and that was just the actionscript part of it. I thought you put a goto action in a frame at the end to tell it to restart the scene, not sure though. Would really need an answer from an expert.
-
Music looping using actionscript is by far the easiest way to do it. Here's how I go about music looping:
1. import your mp3/wav/whatever to loop
2. open your library and right click on the song you just imported, and go to Linkage
3. type the name you want the song to be linked as in the identifier column, and make sure Export for Actionscript is clicked
4. either use one of your background layers or a new background layer with a single frame, and put this code into it:
(assuming you named your Identifier song1)
music1 = new Sound(this);
music1.attachSound("song1");
music1.start(0, 9999);
And that should do it, the 9999 means it'll loop the wav or mp3 9999 times, there might be another variable for indefinite but I do not recall if there is one. If you need anymore help, just say so.
-
To quote the guy from Taxi (ANDY Kauffman)
"Thank you verymuch"