5 Replies Latest reply on May 17, 2016 2:16 PM by robdillon

    flv movieclips playing on there own?

    MoD_Andy Level 1



      I've made a slideshow in ACC (AS3) that is exported as a Projector file. Each slide is an animated movieclip, and two are movieclips with FLV's in them.

      The user can play the slideshow, and skip through each slide using the spacebar. Everything works fine. The movieclips with the FLVs in have stop actions on their first keyframes and only play when the playhead reaches them.


      Now, I've added buttons at the bottom so the user can go back a select each slide as they wish, button 5 goes to slide 5 etc., which works fine, only when using the buttons, for some reason the FLVs decide to play in the background on their own, even though the playhead is not even entering the frame they are on?.


      I'm puzzled so appreciate any advice.



        • 1. Re: flv movieclips playing on there own?
          robdillon Most Valuable Participant

          Once started FLV playback will continue until it is given a stop command or the file ends. From your description, it sounds like you need to add a stop command for the FLV when your user moves to a new slide.

          • 2. Re: flv movieclips playing on there own?
            MoD_Andy Level 1

            That's just the thing, both FLV movie clips have a stop(); on the very first keyframe and they are only told to gotoAndPlay(2); when the playhead goes onto the keyframe they are on.

            None of my buttons go to that particular frame as client doesn't need to reshow those videos but still oddly they play when button is clicked with the mouse.

            And yet they play and stop as they should when going through it one slide after the other with the spacebar.

            • 3. Re: flv movieclips playing on there own?
              robdillon Most Valuable Participant

              So, if I'm understanding, the problem is that one or more videos begin to play when a user moves to a new frame that does not contain any video? Can you show the code that you are using to navigate from slide to slide?

              • 4. Re: flv movieclips playing on there own?
                MoD_Andy Level 1

                It's both videos that play simultaneously.....here's a screen cast that might help explain it better...(sorry it's quite a big file).




                Kind of blagged the code cause I'll admit Im not too up on AS3 but here's the code for each of the button instances:


                button_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_1);
                function fl_ClickToGoToAndStopAtFrame_1(event: MouseEvent): void {
                button_2.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2);
                function fl_ClickToGoToAndStopAtFrame_2(event: MouseEvent): void {


                They reference the frame labels "one", "two" etc.


                This is the timeline....


                No frame labels are on the video start keyframes...the only code they have on their first frame is...which references vidone and vidtwo.



                Which tells them to play (as each has a stop(); on the first frame).


                I know it's a total mess and there are probably better ways to do it but I was kind of in the habit of using AS2.


                This is the code for the spacebar moving on the slides if it helps?...

                stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
                function keyPressed(ev: KeyboardEvent): void {
                  if (ev.keyCode == 32) {
                function nextframe() {
                  if (this.currentFrame < this.totalFrames) {
                  } else {
                  trace("End of Slide Show");



                • 5. Re: flv movieclips playing on there own?
                  robdillon Most Valuable Participant

                  I'm guessing that you are using FLVPlayback components to play the video. A stop() directive on a frame will stop the playback head on that frame but it will have no effect at all on the FLVPlayback component. If you select the component on the stage and then look at the Properties window, you should see the options available for that component. From looking at your sample video, I'm guessing that the component is set to start automatically and also to loop. I think that you will get the playback that you want if you turn off the looping option.


                  If that doesn't solve it then I'll need to see more of your file.

                  1 person found this helpful