4 Replies Latest reply on Jan 15, 2011 9:43 AM by kglad

    Action script question dealing with a loop to a part of time line

    Black Bumblebee

      Hello everyone!

       

      Got another question about modifying an action script in Adobe Flash. Earlier this year, I asked for help in setting up an action script where the video itself would start when the user rolls over the scene, and loop back to the beginning upon completion.

       

      Now, I need to adapt it so that instead of looping all the way back to the beginning, it instead goes to points further into the animation (such as say 10 seconds in) rather than all the way back to the start.

       

      The Script that was created for me was this:

       

      flv.source="flash.f4v";
      flv.autoPlay=false;

       

      flv.autoRewind = true;
      flv_btn.addEventListener(MouseEvent.ROLL_OVER,rolloverF);
      flv_btn.addEventListener(MouseEvent.ROLL_OUT,rolloutF);

      function rolloverF(e:Event):void{
      flv.play();
      }
      function rolloutF(e:Event):void{
      flv.stop();
      }

      flv.addEventListener(Event.COMPLETE,completeF);

      function completeF(e:Event):void{
      flv.play();
      }

       

      Now, I'm thinking that what needs to be changed is the autoRewind = true section, but being a complete novice, I don't even know where to begin. I've seen online sections dealing with a goto command, but my attempts to alter the code haven't worked correctly. Any ideas?