Skip to main content
Known Participant
May 18, 2011
Question

Making sound sync with my controls

  • May 18, 2011
  • 1 reply
  • 328 views

Hello all,

This is one of my first flash movies so bear with my inexperience!

I've made a slide show with three pieces of audio that are set up to play with certain images.  So you can imagine when the video is paused but the sound continues playing everything gets a bit messed up.

I have each audio on a different layer and none of them overlap, just fade in/out to one another.

EDIT:  Almost forgot, so how can I get the audio to stop/play along with the rest of the flash file when play/pause is clicked on.  And can I skip forword/backward 15frames in the audio clip as I am doing with the images?

Here is the AS3 for the back button (gtmf) and foreword button (gtpf)

stop();

mc_content.stop();

gtmf.addEventListener(MouseEvent.CLICK, gtmfs);

function gtmfs(event:MouseEvent) :void {

gotoAndStop(this.currentFrame-15)

mc_content.gotoAndStop(this.currentFrame-15)

pp.gotoAndStop(1);

}

gtpf.addEventListener(MouseEvent.CLICK, gtpfs);

function gtpfs(event:MouseEvent) :void {

gotoAndStop(this.currentFrame+15)

mc_content.gotoAndStop(this.currentFrame+15)

pp.gotoAndStop(1);

}

The play/pause button is a movieclip symbol (pp) with two frames, each with their own AS3.

Play button (gogo)

stop();

gogo.addEventListener(MouseEvent.CLICK, goplaying);

function goplaying(event:MouseEvent) :void {

MovieClip(root).play();

MovieClip(root).mc_content.play();

gotoAndStop(2);

}

Pause button (halthalt)
stop();
halthalt.addEventListener(MouseEvent.CLICK, haltplaying);
function haltplaying(event:MouseEvent) :void {
MovieClip(root).stop();
MovieClip(root).mc_content.stop();
gotoAndStop(1);
}

Message was edited by: FTGLM

This topic has been closed for replies.

1 reply

Known Participant
May 20, 2011

Well I figured it out, but not using AS3, sorry for the incorrect post.  All I had to do was change to "Stream" in the properties panel for each sound clip.