Skip to main content
Participant
September 23, 2020
Question

Video clips all play when I hit the back Button

  • September 23, 2020
  • 2 replies
  • 246 views

I am using a  group of MovieClips  buttons to navigate my program. (Menu) (Back) (Next). When I go through the frames and  hit the back button all the Movieclips play. In this World War One program I have 4 video movie clips with sound and 10 animation  clips. Hitting the (Back) button makes all the movieclips play.

Code for (Back) button:

previous_btn.addEventListener(MouseEvent.CLICK, RootPrevious);
function RootPrevious(e:MouseEvent):void {
MovieClip(root).prevFrame();
}

Code for Next button:

next_btn.addEventListener(MouseEvent.CLICK, RootNext);
function RootNext(e:MouseEvent):void {
MovieClip(root).nextFrame();
}

Code for Menu button:

menu_btn.addEventListener(MouseEvent.CLICK, RootMenu);
function RootMenu(e:MouseEvent):void {
MovieClip(root).gotoAndStop(1);
}Code for MovieClips - A stop and play button.

StopTony_btn.addEventListener(MouseEvent.CLICK, StopCam);
function StopCam(Event: MouseEvent): void {
stop();
}

PlayTony_btn.addEventListener(MouseEvent.CLICK, PlayCam);
function PlayCam(Event: MouseEvent): void {
play();
}

When I take out the (Back) button everything works well. Is  there a way around this?

Thanks

    This topic has been closed for replies.

    2 replies

    kglad
    Community Expert
    Community Expert
    October 7, 2020

    i've never seen the problem you're describing but i have seen inexplicable behavior in fla's that others have created.  sometimes the only remedy i've found is to re-do whatever the author has already done.  that has always fixed the problem.

     

    ie, people can create fla's that seem to be impossible to fix by editing their keyframes.  sometimes recreating them (using copying and pasting of objects) is the only way to fix the problem.

     

    for me to tell you anything more about your particular problem and solve the problem, i would need to download your fla.  (and i don't usually do that unless i'm hired.)  someone else here may do that free of charge.

    kglad
    Community Expert
    Community Expert
    September 23, 2020

    what's a "video movieclip"?

     

    is that a video (either playing in a timeline or an flvplayback component or via code)?  or a movieclip?  or something else?

    Participant
    September 23, 2020

    All are in a movieclip timeline - the  movieclips with sound all play when the bask movieclip button is hit. Three movieclips have FLV video with sound. The  fourth plays an audio file using the frame picker to lip-sync a character. When the Back button is hit none of the plain animations (tweens) work correctly. They go from start to end with no animation. I can take out the (Back) button leaving the (Menu) and (Next) button and all works fine. Thanks for your help!

    kglad
    Community Expert
    Community Expert
    September 23, 2020

    i'm not sure what you expect to happen, but any movieclip that's in a keyframe will play from beginning to end no matter whether you use nextFrame() or prevFrame() (or anything else) to navigate to that keyframe unless you use code to change that behavior.