all groups > flash (macromedia) > december 2006 >
You're in the

flash (macromedia)

group:

Adding sound to key frames


Adding sound to key frames virgosam20
12/19/2006 9:42:32 PM
flash (macromedia):
I have a series of keyframes that are linked with buttons. the sound plays
automatically when the frame is open, however, if the 'back' button is pressed
and the previous key frame is on the stage, the sounds from both key frames
play at the same time. They are in their own layer and each key frame has a
sound to play but i would like to know how i can ensure that only one sound
plays at a time.

Re: Adding sound to key frames michaeltowse
12/21/2006 3:02:07 PM
Re: Adding sound to key frames virgosam20
12/22/2006 3:24:21 PM
Well, that did work, but it stopped all the sound from working, and not just
from the previuos frames.
I need it to only play the sound for the frame that is being shown. so that
the user can flick between the slides and they will only hear one sound at a
time and not them overlapped.
Re: Adding sound to key frames Walter Elias
12/22/2006 4:22:16 PM
In that case it would actually be easier to take the time to learn how to load
sounds dynamically. Then you can control the play of each sound separately.
This is especially appropriate when you're doing what you describe, where the
sounds are associated with buttons. There is an excellent series of tutorials
here:

http://kennybellew.cowfly.com/tutorial/
Re: Adding sound to key frames michaeltowse
2/8/2007 2:05:13 PM
My mistake, Walter is right. Use actionscript to control loading the sounds in
and you get a much wider array of functions to control sound.

try this;

stopAllSounds();
var my_sound = new Sound();
//set the attachSound variable to the name of the linked mp3 file.
my_sound.attachSound("SomeSound", true);
my_sound.start();

Hope it helps.
AddThis Social Bookmark Button