0 Replies Latest reply on May 2, 2006 3:14 AM by ravich9

    Changing FPS for a movieclip

    ravich9
      Hi,

      I would like to change the fps of a movieclip...

      I've used the kglad's code ....which i've found on one of the thread posted in the forum.

      but... the problem is... the fps is not getting applied to the movieclip when it's first time played.... its getting applied from the second time onwards ..(i.e,. only if the movie clip is in loop)..

      my movieclip will not be in loop.. it will play for once... and i would like to change the fps...which should be applicable from the moment it plays.

      help me out....

      thanks & rgds
      ravi


      Attach Code

      MovieClip.prototype.playF = function(m, n, fps) {
      function playF2(mc) {
      if (mc.m<mc.n) {
      mc.nextFrame();
      } else {
      mc.prevFrame();
      }
      if (mc._currentframe == mc.n) {
      clearInterval(mc.int);
      }
      updateAfterEvent();
      }
      this.m = m;
      this.n = n;
      this.fps = fps;
      this.gotoAndStop(this.m);
      clearInterval(this.int);
      this.int = setInterval(playF2, 1000/this.fps, this);
      };