Groups | Blog | Home
all groups > flash actionscript > december 2006 >

flash actionscript : help navigation buttons replay my sound and mess up my sound buttons


rtreitner
12/17/2006 5:03:02 PM
Ok, let?s try this again first I have my two on/off sound buttons in a movie
clip.

You open it up and you see 10 frames the first five for on, and the last five
for off.

Each part contains both buttons, the first the on is highlighted and the off
is coded, the second the off is highlighted and the on is coded.

In the first part my code for the ?off ?button is:

on (release) {

//stopAllSounds Behavior
stopAllSounds();


//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("6");
//End Behavior
}

In the second part my code for the ?on? button is:

on (release) {

// Play Sound Behavior
_global.Behaviors.Sound.coolsound.start(0,1);
// End Play Sound Behavior


//Movieclip GotoAndPlay Behavior
this.gotoAndPlay("1");
//End Behavior
}

I also have an action layer above each with the stop code for each part.

The music loads and plays fine when I run my movie. It stops and starts with
the buttons and they seem to work fine. My problem is whenever I hit a
navigation button on my main timeline it re-starts my music again, instead of
it staying off.

I tried other sound button tutorials besides this one and they all end up with
the same problem. Other buttons in my movie (main my main navigation buttons
re-start my sound again when it goes to the next scene or page. In some cases
other buttons have replayed the sound over one that?s already playing depending
on which tutorial I use. So how come no matter what tutorial I use, other
buttons can restart or effect my sound and its buttons?

rtreitner
12/17/2006 5:04:46 PM
AddThis Social Bookmark Button