7 Replies Latest reply on Dec 29, 2006 7:13 AM by Devendran

    Rollover button to activate FLV file

    jsg5403
      Hi all,

      I'm in the learning stage on flash and I'm working on my first major web page. I've been through tutorials and a few books and I'm a little confused and can't find the answer to this question.

      I'm trying to create a button that when rolled over shows a still image and some text at the same time. When pressed it needs to play an encoded FLV file off an external location. Not streamed.

      I've gotten the rollover working using this:
      on (rollOver) {
      gotoAndStop(4);
      }

      I have the page set up so each frame is a new image with a title. I then made a new layer imported a movie to stage with the player and I'm stuck on how to write the code for it to work when you press the button.

      Any help would be great .

      Thanks,
        • 1. Re: Rollover button to activate FLV file
          arunbe Level 1
          Hi,
          In case of importing a flv file , you just make empty clip manualy,
          And then imort the flv into that particult movieclip.
          So, you can handle the video now as movie clip,
          So, put at stop action in the first frame, and make it to be played when the rollover button is clicked.
          • 2. Re: Rollover button to activate FLV file
            jsg5403 Level 1
            Thanks,

            I did make a new swf file with one frame that had just the player loaded as your suggestion. I then figured out how to create the action script to play the movie as layer 50. My next issue is that once the flv file or movie clip is finished I want that clips to unload. I don't want to create a button to make it end I just want it to end as soon as the clip finishes playing.

            Any ideas?
            • 3. Re: Rollover button to activate FLV file
              arunbe Level 1
              You want to unload the particular movie clip that contain the videos or the whole movie clip ??
              If you want to unload the flv movie clip,
              enter this code at the last frame.

              this.swapDepths(_root.getNextHighestDepth());
              this.removeMovieClip();
              • 4. Re: Rollover button to activate FLV file
                jsg5403 Level 1
                I tried that but it doesn't seem to do what I need.

                Here's the code I have so far.

                stop();

                button1_btn.onRollOver = function(){
                gotoAndstop(2);
                }

                button1_btn.onRelease = function(){
                loadMovieNum("movieplayer1.swf", 50);
                }

                I have the page set up so that a image (layer 0)is being hidden under the movie player (Layer 50) when a button is clicked. I would like the movie player to unload after the video has played so that the image underneith the player appers as it would in it's home state.'
                Thanks again for your help.
                jason
                • 5. Re: Rollover button to activate FLV file
                  Devendran Level 1
                  Then use unloadMovieNum(level)

                  • 6. Re: Rollover button to activate FLV file
                    jsg5403 Level 1
                    I'm still a little confused. I just set it up like this:

                    stop();

                    button1_btn.onRollOver = function(){
                    gotoAndstop(2);
                    }

                    button1_btn.onRelease = function(){
                    loadMovieNum("movieplayer1.swf", 50);
                    }

                    unloadeMovieNum(level)

                    and it still isn't working. My assumption is that I need some sort of cue to tell it when to unload such as on rollover. Except I need the cue to I come from the video itself.

                    I did encode the video with a navigation cuepoint at the end of the video but I have no clue how to begin to write code for that to work even if this is the right way to do this. Is this the right way?
                    • 7. Re: Rollover button to activate FLV file
                      Devendran Level 1
                      hi call that code only when u need.
                      and one more thing u have to mention a level (1 or 2 or 3 or... 50 ...)

                      here u just put unloadMovieNum(level);
                      use unloadMovieNum(50);

                      call this code when u wish to remove the loaded move from stage.