5 Replies Latest reply on Jan 22, 2008 10:25 PM by kglad

    just one button, but it loads 3 different flv's - possible?

    pow_haaweeese Level 1
      hello all,
      I have one button on stage [ btn_01 ] and I have three flv videos I'd like it to play. [ vid_01, vid_02, and vid_03 ].

      (I"d prefer to use the FLVPlayBack component, but if I must use the NetStream route, I can do that.)

      i want to make that button play those -in order- so a different .flv for each click, all from the same button. Possible?

      With the things I'm asking the button to do, makes me think of an array... but looking the ActionScript help, under video...would I be "showing, then hiding" the videos?

      attachVideo (Video.attachVideo method)
      //to load one, then:
      clear (Video.clear method)
      //to clear it?

      but then I'd still need some type of array (I think) to move from one flv to the next...

      if you've any ideas, I'd appreciate it.

      best,
      pow
        • 1. Re: just one button, but it loads 3 different flv's - possible?
          kglad Adobe Community Professional & MVP
          if you're flvplayback instance has instance name flvPlayer and your button has instance name btn, you can use:

          • 2. Re: just one button, but it loads 3 different flv's - possible?
            pow_haaweeese Level 1
            Thank you kglad.
            I appreciate all your help.
            here is my site (one small bug yet) but it's almost complete. You should recognize some functionality features, cause you helped me with them. >smile.

            the one bug I've yet to fix is a handler issue I believe. If you have a chance I'd very much appreciate your thoughts/help.

            if you go to my site:

            www.jimsbook.com

            >near left of three windows on home page is nav.
            >click flash
            >on this page, if I click on one of the four buttons (bottom right hand of page) they gotoAndPlay a swf at a specific place on the timeline. works.

            if I click the next button, it works. but if I repeatedly click on btns 1-3, the go nowhere on the second click, but on the third, they play correctly. so they alternate, play, then nothing, then play again. btn 4 goes to next scene on second click.

            I've stops on frame labels above each of the four swf sections on the timeline, and am not understanding why the button does not behave the same way every click. I'm sending it to a specific label. shouldn't it repeat that whether I press it twice or twenty times?

            if you notice any reason as to why that'd be happening...I'd appreciate your thoughts.

            and thanks for your past help, wouldn't have been able to make this without yours and other's help.

            (now maybe if I can get a job...>smile)

            button name: "btn_04"
            label name: "ggcStart"
            empty movie clip to display swf: "swfHolder_ggc"
            swf: "ggc_creature"


            <code

            btn_04.onRelease = function(){

            this._parent.gotoAndPlay("ggcStart");

            this._alpha = 45;

            var container:MovieClip = createEmptyMovieClip("swfHolder_ggc",

            getNextHighestDepth());

            var mcLoader:MovieClipLoader = new MovieClipLoader();

            mcLoader.addListener(this);

            mcLoader.loadClip("siteAssets/flash/ggc_creature.swf", container);

            function onLoadInit(mc:MovieClip) {

            trace("onLoadInit: " + mc);

            }
            }
            /code>

            • 3. Re: just one button, but it loads 3 different flv's - possible?
              kglad Adobe Community Professional & MVP
              i don't know what's causing that problem, but it's easy to prevent: when a button is pressed enable the previously pressed button (using a previouslyPressed variable) and disable the current button (and assign it to the previouslyPressed variable).
              • 4. Re: just one button, but it loads 3 different flv's - possible?
                pow_haaweeese Level 1
                thanks kglad,
                I'll look those up and give that a shot.

                best,
                Pow