1 Reply Latest reply on Oct 16, 2006 7:33 AM by kglad

    Changing Speed of Flash Parts

    arminpohl
      I'm VERY new to flash programming. I downloaded a template and changed around some of the text to suit my needs. Some of the text sequences are too quick and I wanted to slow them down so that the end user can read them. I don't think there is an easy way of lengthening the text clips because of the numerous layers involved (sound & background visuals),so I thought I would slow down the FPS for a certain portion. I found this script...

      var fps:Number = 80;
      var intervalID:Number = setInterval(this, "advanceFrame", 1000/fps);
      stop();
      //
      function advanceFrame() {
      clearInterval(intervalID);
      gotoAndStop(_currentframe+1);
      if (_currentframe<151) {
      intervalID = setInterval(this, "advanceFrame", 1000/fps);
      } else {
      play();
      }
      }

      It's supposed to slow down the script from frame 80 to 150. I changed the frame values for my purposes. It doesn't seem to be working. I clicked on the frame where I wanted to start the slowdown and inserted a keyframe and added the script.
      I changed the values in...
      var fps:Number = 435;
      var intervalID:Number = setInterval(this, "advanceFrame", 15/fps);
      to...
      intervalID = setInterval(this, "advanceFrame", 16/fps);

      and...
      if (_currentframe<495) {
      intervalID = setInterval(this, "advanceFrame", 25/fps);

      does this look ok ?
      are any of the above lines comments and shouldn't be in the script ? like (this,"advanceframe" ?

      thanks in advance,

      armin
      to...
      if (_currentframe<151) {
      intervalID = setInterval(this, "advanceFrame", 24/fps);