3 Replies Latest reply on Sep 18, 2009 11:45 PM by AttaBoy2

    Creating a movie file with user interactivity

    Bigjohn88

      Hi,

      I'm new to using flash and actionscript, but i'm looking to learn how to make a video or a series of videos play using flash. Where the user has to click on a specific part of the screen to play the next video. I'm using Flash cs3 to do this and again i'm new to this so i don't know how to navigate very well. If anyone could provide me with a tutorial or walkthrough on this that'd be amazing.

       

      Again it's a series of videos that play with a narration/caption and the user has to click on a certain part of the screen to play the next video.

        • 1. Re: Creating a movie file with user interactivity
          kglad Adobe Community Professional & MVP

          decide whether you're going to use as2 or as3.  then use google to search for a video tutorial.

          • 2. Re: Creating a movie file with user interactivity
            AttaBoy2 Level 3

            this code is all I needed to do what you describe:

            here is the finished product http://jimslounge.com/vidSeqTest/vidSeqTest.html

            you can access each part individually by going here http://jimslounge.com/vidSeqTest/

             

            var counter:int = 0;
            var videos:Array = new Array("vid1.flv", "vid2.flv", "vid3.flv", "vid4.flv");

             

            next_btn.alpha=.1;
            prev_btn.alpha=.1;
            next_btn.buttonMode = true;
            prev_btn.buttonMode = true;
            next_btn.addEventListener(MouseEvent.ROLL_OVER, alphaUp);
            prev_btn.addEventListener(MouseEvent.ROLL_OVER, alphaUp);

             

            next_btn.addEventListener(MouseEvent.ROLL_OUT, alphaDown);
            prev_btn.addEventListener(MouseEvent.ROLL_OUT, alphaDown);

             

            next_btn.addEventListener(MouseEvent.CLICK, nextMovie);
            prev_btn.addEventListener(MouseEvent.CLICK, prevMovie);

             

            function alphaUp(e:MouseEvent):void {
                e.target.alpha = .3;
            }

             

            function alphaDown(e:MouseEvent):void {
                e.target.alpha = .1;
            }

             

            function nextMovie(e:MouseEvent):void {
                counter++;
                if(counter >= videos.length){ counter = 0;}
                player.source = videos[counter];
            }
            function prevMovie(e:MouseEvent):void {
                counter--;
                if(counter < 0){ counter = videos.length-1;}
                player.source = videos[counter];
            }

             

            I just dragged a flvPlayBack component on stage, made a couple of rectangles and placed them over the upper corners of the FlvVideoPlayback component converted the rectangles to movie clips and made them my buttons.

            tje instance name of the player is player.

            1 person found this helpful
            • 3. Re: Creating a movie file with user interactivity
              AttaBoy2 Level 3

              I overlooked the part about captions.  Here's a link to a tutorial that might help http://www.lynda.com/home/DisplayCourse.aspx?lpk2=347

              It's

              ActionScript 3.0 in Flash CS3 Professional Beyond the Basics

              a very good tutorial.