1 Reply Latest reply on Apr 9, 2010 7:33 AM by kglad

    Controller/Scrubber for animation with scenes

    jmtanner

      Hello,

       

      I would like to make a player controller with a scrubber for an animation I am creating. I do not want to control a video (mp3, flv, or other). I want to control the animation on the timeline.

       

      My Flash file has scenes.

       

      Is there a tutorial for applying a controller for this kind of file?

       

      Thanks!

       

      Jerry T

        • 1. Re: Controller/Scrubber for animation with scenes
          kglad Adobe Community Professional & MVP

          there's not enough material for a tutorial.  just define your parameters and scrub:

           

          parametersF(scrubberMC,scrubberMin,1,scrubberMax,_root._totalframes);

           

          scrubberMC.onPress=function(){

          this.startDrag(false, scrubberMin,this._y,scrubberMax,this._y);  // for a horiz scrubber

          this.onEnterFrame=scrubF;

          }

          scrubberMC.onRelease=function(){

          this.stopDrag();

          _root.play();

          delete this.onEnterFrame;

          }

          function scrubF(){

          _root.gotoAndStop(Math.round(this.m*this._x+this.b));

          }

           

           

          function parametersF(mc,x1,y1,x2,y2){

          mc.m=(y1-y2)/(x1-x2);

          mc.b=y1-mc.m*x1;

          }