3 Replies Latest reply on Jun 14, 2013 5:52 AM by kglad

    change the fps rate

    lalitha subramanian Level 1

      Hi

       

      How to change the fps rate in as2

        • 1. Re: change the fps rate
          kglad Adobe Community Professional & MVP

          you can't change the framerate with actionscript using as2.  you can with as3 and, you can fake it and play any movieclip at any (approx) framerate (forwards or backwards), no greater than the native frame rate, using playF:

           

          to play a movieclip (eg, _root from frame 1 to its last frame 24 fps):

           

          playF(_root,1,_root._totalframes,24);  // to stop it, use stopF(_root);

           

           

          function playF(mc, m, n, fps) {

              playFFF2 = function(mc) {

                  trace(getTimer());

                  if (mc.m<mc.n) {

                      mc.nextFrame();

                  } else {

                      mc.prevFrame();

                  }

                  if (mc._currentframe == mc.n) {

                      clearInterval(mc.int);

                  }

                  updateAfterEvent();

              };

              mc.m = m;

              mc.n = n;

              mc.fps = fps;

              mc.gotoAndStop(mc.m);

              clearInterval(mc.int);

              mc.int = setInterval(playFFF2, 1000/mc.fps, mc);

          }

          function stopF(mc) {

              clearInterval(mc.int);

          }

          • 2. Re: change the fps rate
            lalitha subramanian Level 1

            okay thanks

            • 3. Re: change the fps rate
              kglad Adobe Community Professional & MVP

              you're welcome.