How do you make music play continuously through various scenes?
I’ll try and explain it better.
Example. I have scene 1, 2, and 3. On scene 1, there is a button that links to scene 2 and 3. I want to put in some music for these particular scenes. But if I drop the looped mp3 into scene 1, it will play in scene 1, but the minute you click on the button that takes you to scene 2 or 3, the music stops/and or halts. I don’t want the music to stop and just keep going for the 3 scenes. Does this make sense. If you anyone doesn’t understand, let me know and i’ll try to explain again. Thanks.
Pv_37, thanks for the info. But I know that already. And if i did do that the user would hear the song for x amount of times. I forgot to mention that, I want the song to only play in scene 1, 2, and 3. That I also have a scene 4 which the user can get by way of scene 1. I need the music to stop as soon as the user gets to scene 4.
Place this snippet at the start of the scenes where you want sound i.e. 1, 2 and 3 in your case. [If you can hop from scene 4 to scene 3 or scene 2 then you’ll need to place it in scene 2 and scene 3, otherwise you can just place it in scene 1]
if (!looped_sound) {
looped_sound=new Sound()
looped_sound.attachSound(“loop”)
looped_sound.start(0,100)
}
and this snippet at the start of the scenes where you don’t want sound
if (looped_sound) {
looped_sound.stop();
looped_sound = null;
}
You’ll need to create a linkage for your soundfile with the identifier “loop” (right click in the library and choose linkage) or edit the AS to suit your purpose.