4 Replies Latest reply on Mar 16, 2010 11:35 PM by budge_frownie

    Controlling a movie


      Hey there, recently I started experimenting with importing movies into my flash projects. I'm a little new to the controls for this so I was wondering if you guys could help me out. I place the movie within a mask an wish to keep it unplayed until it is revealed by a mask upon a button click


      I have created an instance a of mov_flv for the imported video content but wish to use my own play and stop controls causing the video to play when revelead and to stop when unmasked.


      Any help on this would be really appreciated and am currently using cs4 action script 2.0



        • 1. Re: Controlling a movie

          You'll need to tie the play to the button that you're using to reveal the MovieClip. So if your button was named "reveal_Btn" the code would look like:


          //This will keep your movie from playing//



          reveal_Btn.onRelease= function ():Void {




          The unmasking/stopped part, I'm not entirely following but if you need something more just ask.

          • 2. Re: Controlling a movie
            budge_frownie Level 1

            ah thanks so much, Ive seen the void function but not entirely sure how it is used


            If my reveal button caused a mask movie to tween/expand onto the said mov_flv would the code look something like




            reveal_btn.onRollOver = function (): Void{

            gotoAndPlay (frame number that causes the maskmovie to expand);




            reveal_btn.onRollOut = function ():Void{

            gotoAndStop (framenumber with mask set off of the movie);





            In case I use the release function and cause a stop button do i something like real_btn.onRelease = function ():Void{

                                                                                                                                stop_btn.visible (true);


            Thanks again for the help =)

            • 3. Re: Controlling a movie
              theideafarmer Level 1

              For the most part..


              You'll need to specify the object that contains the mask, since that's the nested timeline you're trying to access and play. So if you're triggering both of the play states it would be:


              reveal_btn.onRollOver = function (): Void{

              mask_mc.gotoAndPlay (frame number that causes the maskmovie to expand);




              Presuming that mask_mc is your other clip you're triggering.

              • 4. Re: Controlling a movie
                budge_frownie Level 1

                Hey there, I got everything working but am faced with a couple of questions:


                1) my video (mov_flv) lies in a movie clip (mov_mc). Upon reaching completion the movie stops and I would like it to seamlessly loop as long as the video is visible. Is there any action script to target the flv file within the mc to play again upon completion?


                2) I'd also like to give the video a few control options (play/pause, forward and rewind) . I'm not sure if this should lie on the main time line or within the mov_mc and where to target it from


                As always any help much appreciated! thanks!