PDA

View Full Version : audio control help


buckfu
02-05-2008, 03:02 PM
Hey folks,

sorry I just saw the 'no actionscript' tagline below this forum in the main list...mods feel free to move it....

I'm using Flash MX and have a project where the root level has two buttons: forward and previous. These buttons jump to specific labeled keyframes that contain a movie clip that contains an audio file placed on a layer.

When I test it, and move forward through the project, the audio clips stop, and then the next one will begin nicely....however when I use the previous button, multiple audio clips will play at the same time.

The same happens when I use the 'table of contents' buttons to jump to a specific section...all button actions are the same, for example:

on (press) {
stopAllSounds();
gotoAndPlay("four");
}


Is there a better way to handle audio when jumping from one keyframe to another on the root level, and the audio is contained within a movie clip?

any guidance will be greatly appreciated.

Minty Fresh
02-08-2008, 07:28 PM
Give this a try. Inside a movieClip with a streaming audio clip...var s = new Sound (audioName-linked in the library); s.stop();. You may need to using some paths to reach into the specific clip to stop the sound. For example "this.audioClip.s.stop();"

atomic
02-08-2008, 07:35 PM
I already solved it in this other thread of his...

http://www.actionscript.org/forums/showthread.php3?t=159834