Music

well, in my flash video, i want an music file (.wav) to load after a certian frame, but i want the music to keep looping too. where i want the mp3 to load, its the end of the flash movie so nothing else happens during the song. any help would be great :stuck_out_tongue:

Wait - so you want to load the wav (mp3 and wavs are different) at the end of the movie and you want the music to keep looping?

yes, thats what i want to do. i can convert the .wav to .mp3 if i really need too.

mySound = new Sound();
mySound.attachSound("Sound File URL");
mySound.onLoad = function () {
	mySound.start(0, 999);
}

Put this in the last frame. 999 is the times it loops. Make sure you enter the URL. Untested - came off my head.

ok, when u mean URL do u mean the location of the .wav in my computer, or does it have to be on the internet?

i just tried putting the code in, it looks like this…

mySound = new Sound();
mySound.attachSound(“C:/my documents/my music/bgmusic.wav”);
mySound.onLoad = function () {
mySound.start(0, 999);
}

is something wrong?

Whichever one the file is stored in.

Instead of C:/my documents/my music/bgmusic.wav try this:

C:\my documents\my music\bgmusic.wav

Yes leave those 2 back-slashed :).

lol, it still didnt work :P. well, what i want is, i want the music to start at a certian frame, but when the music starts, all the animations are over. so, i want the animation to stop after the music starts, but i want the music to keep looping. when i did put my sound in, the sound started, then the animation started over like it normally would, and it would load up the mp3 again. so, should i put a stop in the actions too? i have about 7 layers in my flash, do i have to put the code in every layer?

Shoots Self

Yes! Of course you have to put a stop action on the last frame.

Ah your killing me :P.

lmao i tried that too and it STILL didnt work. it played but then it didnt loop.