PDA

View Full Version : What is the correct code for putting music in flash



Zero
03-26-2010, 04:40 AM
I was putting music in flash for an animation but when i stop the animation the music will just keep on playing. The worse part here is that whenever i test the movie(the movie always restart when your animation is done) the song keeps on repeating.Here's what I meant: http://www.truploader.com/view/520145 .First there's one song then after the animation the same song comes in and so on so fort. I need help.

Here's my action script:
sound1 = new Sound(); // “sound1″
sound1.start(); //

Edit: I'm using MACROMEDIA FLASH PROFESSIONAL 8.

alive
03-26-2010, 06:24 AM
You can just set it to stream in the properties panel and set numbers of repeats to 0.
http://i262.photobucket.com/albums/ii94/mannebjorn/Picture1-2.png

Zero
03-26-2010, 07:33 AM
Okay that fixed the repeating but then an error comes in when i test the movie. It says:
SWF contains multiple copies of a sound item. What does that mean?

alive
03-28-2010, 05:58 AM
If you still have your actionscript set to start the sound, that could be the problem. Try deleting it. If it doesn't work, delete your sound file from the library and reimport it, and try again.

Zero
03-28-2010, 08:24 AM
Okay.
(15 characters) -_-

Zed
03-28-2010, 08:28 AM
Only 10 characters now, and you can get around it by pressing loads of spaces and then a full stop if you find that easier.

Zero
03-28-2010, 08:48 AM
Hahaha. Oh yeah, now its 10. Thanks.