5 Replies Latest reply on Sep 18, 2009 2:03 PM by Ned Murphy

    How do I? (involving links and movie files)

    CS Director

      #1. How do I get a movie to close after it has played?

      #2. In my menu I have 8 links. I'd like to have 7 links disappear when the user rolls over the 1 link. How would I make the other 7 disappear when the user is rolled over 1?



        • 1. Re: How do I? (involving links and movie files)
          Ned Murphy Adobe Community Professional & MVP

          1.  How was the movie opened to begin with?  Whaqt type of movie is it?  Where is it opening?  What version of actionscript are you using?


          2. The links would have to be separate movieclips or buttons that you could assign instance names to in order to be able to control the visibility of them.  How you control visibility depends on which version of actionscript you use.

          • 2. Re: How do I? (involving links and movie files)
            CS Director Level 1

            I apologize for not giving more information.


            #1. I'm using Flash CS4 Professional. I'm using FLV playback for my movie files. Check out my website: www.wilson-graphics.com. My movie files don't close after the movie is finished playing and I'd like for them to.


            #2. As far the links, when I edit one link (in a different scene than my original - Scene 1) the other links are grayed out like I can't edit them as well. How can I make their visibility = 0 if I'm not able to edit them?


            Hope this helps.

            • 3. Re: How do I? (involving links and movie files)
              Ned Murphy Adobe Community Professional & MVP

              1.  I am not well-versed in video matters, so the best I can offer is to tell you to look at the FLVPlayBack component in the help documents to see what kinds of events it can provide indications for.  It seems as though when you start a new video, it closes out the existing one, so you may want to look into that code to see how it is closing the player, and then use that code when a movie completion event is detected.  If you are using AS3, then the help docs tabulate all of the properties, methods, and events separately, so they should be easy to find.  YOu'd be looking for an event that signals the movie is done playing.


              2. As I mentioned already, to control the visibility of things dynamically you need to assign instance names to each of your links, each of which needs to be either a movieclip or a button.  Then you can use actionscript to set the visibility to true or false as needed.  What I will usually do is have a function that does this for things as a group, make all the buttons invisible/visible at the same time, while keeping the selected one visible.  You still haven't divulged which version of actionscript you are using.

              • 4. Re: How do I? (involving links and movie files)
                CS Director Level 1

                I am using AS3. When I click a link, the movie file from the previous link isn't "closed" exactly. I have each link assigned to a frame. When the user selects another link, the user is taken to that particular frame, which is a different frame than the previous movie is assigned to. Does that make sense? So in actuality I'm not really closing anything. Just going to a different frame.

                • 5. Re: How do I? (involving links and movie files)
                  Ned Murphy Adobe Community Professional & MVP

                  Maybe for that aspect you can use whatever end-of-video event is available to have your file go to a frame that has no movie waiting in it each time a movie completes.  From what I see in the help docs, the AS3 FLVPlayback component offers a 'complete' event.  So you should be able to add an event listener for that using whatever instance name you assign to the FLVPlayback component.  So if you give it an instance name of, say "vPlayer", then you would code this for it...


                  vPlayer.addEventListener(VideoEvent.COMPLETE, closeVideo);


                  And you could have the event handler function, closeVideo in this example, be a shared function (meaning it goes on an AS layer that extends the whole timeline)  The event handler function would just tell the timeline to go to that frame you dedicate for no-show.


                  function closeVideo(evt:VideoEvent):void {