1 Reply Latest reply on Aug 10, 2007 5:04 PM by crazyjoemilan

    Pausing a function

    michael novia Level 1
      How would i pause this for loop before it goes through again? i was thinking about using setInterval, but the way its used doesnt seem like its possible?


        • 1. Re: Pausing a function
          crazyjoemilan Level 2
          After writing a response, it finally donned on me what you want. you're looking to slow down the loop to actual time, right?

          instead of using a for loop, use setInterval and a function.

          So turn the for loop into a function, then call it with setInterval. When your variable = fHeight, kill the interval using clearInterval(intervalName);