0
votes

I have one button for this slider. The slider has three sections.

Frame 24 has the first frame loaded. It is labeled "frame1". There is a button with the following code. rightButton_1.addEventListener(MouseEvent.CLICK, bj_goRightTo2);

function bj_goRightTo2(event:MouseEvent):void
{
gotoAndPlay('1goesTo2');
}

Frame 25 starts the transition between the first and second frame. It is labeled "1goesTo2".

Frame 64 is the second frame loaded. It is labeled "frame2" Again there is a button with the next set with a gotoAndPlay('2goesTo3')

Frame 104 is the third frame loaded. It is labeled "frame3" Again there is a button with gotoAndPlay('3goesTo1').

But at the end of 3goesTo1 is a gotoAndStop('frame1').

At 'frame1' the code tells the button to gotoAndPlay('1goesTo2') but it actually only does the last gotoAndPlay('3goesTo1');

How can I get this button to refresh it's code?

1
is it the same button in every frame, with just a different event listener attached to it? - BumbleShrimp
yes it is. Should I just create different buttons for each? - Brian

1 Answers

0
votes

I would`t try to change the eventhandler in the timeline. Instead I would add one eventhandler in the parent clip and check the current label when the button receives a mouse click event.