I have a flash project that has 6 scenes. I want the sound to change when I change sceenes. Currently when I move to a new scene the sound that is currently playing continues to play. How can I make it stop once a scene is changed so just the sound attached to the new scene will play.
if it’s the same sound object …
sound.stop();
sound.attachSound("newsound");
sound.start();
that should work =)
i would put an action in the first frame of each scene to load the sound and I would make sure that the first line of my actionscript in that frame was:
[AS]stopAllSounds();[/AS]
then i would load the sound and play it in the next line of code.
so that way i would not have multiple loops playing over top of one another
In scene 1 I put this action into first frame of a new layer:
stopAllSounds();
sound.attachSound(“m-untitled.mp3”);
sound.start();
No audio is playing when I test the movie. ? How can I get this to work.
put the stopAllSounds() in the first frame
put the sound.attachSound(“m-untitled.mp”);
sound.start();
in the second frame
i tried that but still not getting audio to work. Do I need to select sound in the properties inspector and choose the audio file? I thought that function would be replaced by the action attachSound(“m-untitled.mp”);?
Just don’t know how to get this running right.