9 Replies Latest reply on Apr 27, 2009 5:23 PM by kglad

    Help Please.

    aperf8ectcircle

      This is probably a stupid question...

       

      I'm having a problem with making buttons disappear after a selection is made and a imported movie play.

       

      I am a student and created some motion graphics in After Effects for a project. I am trying to create a menu in flash where there are only buttons on a page - and clicking each one will take you to a video, and after the video plays - goes back to the screen with the buttons. I'm used to working in AE and am finding the timeline in Flash confusing!

       

      I imported my video into Flash as a FLV file and converted it to a movie clip, and have it in its own layer on frame 1 on the timeline. Then I created the 5 buttons and have them in another layer on frame 1. I them created an actions layer above all the layers and entered the following script:

       

      selectingyears_mc.stop();

      function playMovie(event:MouseEvent):void

      {

      selectingyears_mc.play();

      }

      playall_btn.addEventListener(MouseEvent.CLICK, playMovie);

       

       

      When I play the movie, the buttons stay floating above it, which I don't want. Any help would be greatly appreciated!

       

      Thanks.

      Neal

        • 1. Re: Help Please.
          kglad Adobe Community Professional & MVP

          1.  put your buttons on frame 1 of the main timeline with a stop().  don't import your flv file into the flash ide.

           

          2.  for each of your buttons, assign a source or contentPath variable that indicates the flv file to stream, and have your buttons direct the main timeline to another keyframe (say 5), where you have an flvplayback component and assign its source or contentPath to the variable defined by the button.  also, use a complete listener to detect when the flv completes play and, when it does, direct the main timeline back to frame 1.

          1 person found this helpful
          • 2. Re: Help Please.
            aperf8ectcircle Level 1

            Thank you very much for your help.

             

            I'm still having a problem trying to understand the ActionScript that I need to tell the movie clip to listen for the end of the movie and then go back to frame 1.

             

            Here is a screenshot of my script.

            • 3. Re: Help Please.
              kglad Adobe Community Professional & MVP

              if flv is you component's instance name, you can use:

               

               

              flv.addEventListener(VideoEvent.COMPLETE,videoCompleteF);

               

              function videdCompleteF(e:Event){

              gotoAndStop(1);

              }

               

              p.s.  i think you'll need to import the videoevent:

               

              import fl.video.VideoEvent;

              1 person found this helpful
              • 4. Re: Help Please.
                aperf8ectcircle Level 1

                Thanks again. I'm still can't seem to get this to work though.

                 

                I was embedding the videos and making them movie clips. I can't figure out how to stream them, and I think it isn't necessary since this is not going on a website - it is just for display on my computer for an art show.

                 

                I've tried to modify what you gave me by changing "flv" to the instance name of my movie clip, but it did not work:

                 

                flv.addEventListener(VideoEvent.COMPLETE,videoCompleteF);

                function videdCompleteF(e:Event){
                gotoAndStop(1);
                }

                 

                Any suggestions?

                 

                Thanks again.

                Neal

                • 5. Re: Help Please.
                  kglad Adobe Community Professional & MVP

                  it would be easier to help you if you followed the steps in my first post.

                  • 6. Re: Help Please.
                    aperf8ectcircle Level 1

                    I didn't realize that bringing a flv into flash as a flvplayback component didn't actually import the file. I will go back and do what you said, I'm just not used to Flash, so it's a little confusing.

                     

                    Thanks, I appreciate your help.

                    • 7. Re: Help Please.
                      kglad Adobe Community Professional & MVP

                      you're welcome.

                       

                      let me know if you have any problems with any of the steps.

                      • 8. Re: Help Please.
                        aperf8ectcircle Level 1

                        I can't figure out the ActionScript for the button to assign a contentPath that indicates the flv to screen and direct the main timeline to another keyframe.

                         

                        The file is going to be on my computer, since this is not a website. Do I direct it to the folder it is in?

                        • 9. Re: Help Please.
                          kglad Adobe Community Professional & MVP

                          yes, use the path relative to your exe.  start with putting the videos in the same directory as your flash files and put all your flash files for this app in the same directory.