8 Replies Latest reply on Sep 4, 2006 5:24 PM by Newsgroup_User

    How to remove the Flvplayback component?

    Level 7
      HI! what is the proper way to unload the PLVplayback component? I need to
      stop the flv that's playing and/or remove the flvplayback to that another
      page can load another clip into it without added it on top.

      Paul


        • 1. Re: How to remove the Flvplayback component?
          Level 7
          Paul,

          > HI! what is the proper way to unload the PLVplayback component?

          The functionality of all objects -- Components are objects, like just
          about everything else, including movie clips, buttons, text fields, etc. --
          is defined but the object's class. Movie clips are defined by the MovieClip
          class; buttons by the Button class; FLVPlayback Component by the FLVPlayback
          class. Classes define properties (characteristics), methods (things the
          object can do), and events (things the object can react to), as available.

          Components' classes are listed in the Components Language Reference (via
          F1 key). For some reason, properties, methods, and summaries are usually
          separated in the Components Language Reference -- not sure why -- but if you
          look up the methods summary for the FLVPlayback class, you'll find what
          you're after.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: How to remove the Flvplayback component?
            Level 7
            David Stiller wrote:
            > Paul,
            >
            >> HI! what is the proper way to unload the PLVplayback component?
            >
            > The functionality of all objects -- Components are objects, like just
            > about everything else, including movie clips, buttons, text fields, etc.
            > -- is defined but the object's class. Movie clips are defined by the
            > MovieClip class; buttons by the Button class; FLVPlayback Component by
            > the FLVPlayback class. Classes define properties (characteristics),
            > methods (things the object can do), and events (things the object can
            > react to), as available.
            > Components' classes are listed in the Components Language Reference
            > (via F1 key). For some reason, properties, methods, and summaries are
            > usually separated in the Components Language Reference -- not sure why --
            > but if you look up the methods summary for the FLVPlayback class, you'll
            > find what you're after.
            >
            >
            > David Stiller
            > Adobe Community Expert
            > Dev blog, http://www.quip.net/blog/
            > "Luck is the residue of good design."

            HI! I was able to stop the flv by using the following but I was unable to
            remove/close the component.

            on (release) {
            my_FLVPlybk.stop();
            my_FLVPlybk.closeVideoPlayer();
            gotoAndStop(3);
            }

            I am using flash 8 with action script 2.0

            This is how I import and play the flv.

            on (release) {
            import mx.video.*;
            my_FLVPlybk.load("Beyond the Ice Featurette NEW best_NEW.flv");
            my_FLVPlybk.play();

            _root.my_FLVPlybk.swapDepths(1);
            }


            • 3. Re: How to remove the Flvplayback component?
              Level 7
              > HI! I was able to stop the flv by using the following but I was unable to
              > remove/close the component.
              >
              > on (release) {
              > my_FLVPlybk.stop();
              > my_FLVPlybk.closeVideoPlayer();
              > gotoAndStop(3);
              > }

              The docs state that the FLVPlayback.closeVideoPlayer() method requires a
              parameter. You haven't supplied that. ;)

              Here's another hint -- another direction altogether -- if you look at
              the FLVPlayback class entry itself, you'll see that the FLVPlayback class
              inherits from MovieClip. In other words, FLVPlayback instances *are* movie
              clips. They can do anything/everything a movie clip can do, plus more (that
              is, whatever is defined by the FLVPlayback class). So ... if the
              FLVPlayback class doesn't give you exactly what you're looking for, revert
              to the MovieClip class.


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."


              • 4. Re: How to remove the Flvplayback component?
                Level 7
                David Stiller wrote:
                >> HI! I was able to stop the flv by using the following but I was unable to
                >> remove/close the component.
                >>
                >> on (release) {
                >> my_FLVPlybk.stop();
                >> my_FLVPlybk.closeVideoPlayer();
                >> gotoAndStop(3);
                >> }
                >
                > The docs state that the FLVPlayback.closeVideoPlayer() method requires
                > a parameter. You haven't supplied that. ;)
                >
                > Here's another hint -- another direction altogether -- if you look at
                > the FLVPlayback class entry itself, you'll see that the FLVPlayback class
                > inherits from MovieClip. In other words, FLVPlayback instances *are*
                > movie clips. They can do anything/everything a movie clip can do, plus
                > more (that is, whatever is defined by the FLVPlayback class). So ... if
                > the FLVPlayback class doesn't give you exactly what you're looking for,
                > revert to the MovieClip class.
                >
                >
                > David Stiller
                > Adobe Community Expert
                > Dev blog, http://www.quip.net/blog/
                > "Luck is the residue of good design."

                HI! Thanks for responding, I have looked at the docs and added a 0 for the
                index. but now I get an error when I push the button.

                "Cannot delete VideoPlayer"

                on (release) {
                my_FLVPlybk.stop();
                my_FLVPlybk.closeVideoPlayer(0);
                gotoAndStop(3);
                }

                Paul


                • 5. Re: How to remove the Flvplayback component?
                  Level 7
                  > HI! Thanks for responding, I have looked at the docs and
                  > added a 0 for the index. but now I get an error when I push
                  > the button.
                  >
                  > "Cannot delete VideoPlayer"

                  Is that the exact error? Or does it mention a series of players -- that
                  you can't delete the first player in a series?

                  In any case, as I mentioned, the FLVPlayer extends MovieClip. So if the
                  closeVideoPlayer() doesn't give you the answer you need, just
                  MovieClip.removeMovieClip() on your FLVPlayback instance.

                  on (release) {
                  my_FLVPlybk.stop();
                  my_FLVPlybk.removeMovieClip();
                  gotoAndStop(3);
                  }

                  Make sense? Anything that inherits the MovieClip class -- and this one
                  does, as I described earlier -- actually *is* a movie clip.


                  David Stiller
                  Adobe Community Expert
                  Dev blog, http://www.quip.net/blog/
                  "Luck is the residue of good design."


                  • 6. Re: How to remove the Flvplayback component?
                    Level 7
                    David Stiller wrote:
                    >> HI! Thanks for responding, I have looked at the docs and
                    >> added a 0 for the index. but now I get an error when I push
                    >> the button.
                    >>
                    >> "Cannot delete VideoPlayer"
                    >
                    > Is that the exact error? Or does it mention a series of players --
                    > that you can't delete the first player in a series?
                    >
                    > In any case, as I mentioned, the FLVPlayer extends MovieClip. So if
                    > the closeVideoPlayer() doesn't give you the answer you need, just
                    > MovieClip.removeMovieClip() on your FLVPlayback instance.
                    >
                    > on (release) {
                    > my_FLVPlybk.stop();
                    > my_FLVPlybk.removeMovieClip();
                    > gotoAndStop(3);
                    > }
                    >
                    > Make sense? Anything that inherits the MovieClip class -- and this one
                    > does, as I described earlier -- actually *is* a movie clip.
                    >
                    >
                    > David Stiller
                    > Adobe Community Expert
                    > Dev blog, http://www.quip.net/blog/
                    > "Luck is the residue of good design."

                    Thanks it worked. and the exact error was "Cannot delete default video
                    player."
                    I did not define any other instence thought. but I re-read the docs and it
                    mentions that it will remove another player if define with an index.

                    If my first player was 0 and the other was 1 then I could remove the the
                    second player 1 but useing the my_FLVPlybk.closeVideoPlayer(1); and then I
                    would only have the player 0 on the screen.

                    But why can we not remove the default player? or is the removeMovieClip()
                    the only simple way?

                    Paul


                    • 7. Re: How to remove the Flvplayback component?
                      Level 7
                      > But why can we not remove the default player?

                      That's a good question. I haven't dealt a whole lot with the
                      FLAPlayback Component.

                      > or is the removeMovieClip() the only simple way?

                      Seems pretty simple to me. ;)


                      David Stiller
                      Adobe Community Expert
                      Dev blog, http://www.quip.net/blog/
                      "Luck is the residue of good design."


                      • 8. Re: How to remove the Flvplayback component?
                        Level 7
                        David Stiller wrote:
                        >> But why can we not remove the default player?
                        >
                        > That's a good question. I haven't dealt a whole lot with the
                        > FLAPlayback Component.
                        >
                        >> or is the removeMovieClip() the only simple way?
                        >
                        > Seems pretty simple to me. ;)
                        >
                        >
                        > David Stiller
                        > Adobe Community Expert
                        > Dev blog, http://www.quip.net/blog/
                        > "Luck is the residue of good design."

                        Yes it is :) , and Thanks for all the help.

                        Paul