The NEW Build Your Own Arcade Controls

Main => Artwork => Topic started by: Floyd10 on June 28, 2004, 04:33:54 pm

Title: Simple Flash MX question.
Post 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
Title: Re:Simple Flash MX question.
Post by: SirPoonga on June 28, 2004, 05:43:05 pm
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.
Title: Re:Simple Flash MX question.
Post by: CthulhuLuke on July 05, 2004, 07:50:34 pm
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)
Code: [Select]
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.
Title: Re:Simple Flash MX question.
Post by: Floyd10 on July 08, 2004, 03:58:47 pm
To quote the guy from Taxi (ANDY Kauffman)

"Thank you verymuch"