1 Reply Latest reply on Sep 28, 2010 8:20 AM by srirama.83

    clearInterval()

    Ron Colmen Level 2

      Below is a part of my dynamic image gallery code. How can I set clearInterval() only for 5 seconds and then continue as usual? will setTimeout() be a better choice?

       

      pause.onRelease = function() {

      clearInterval(IntervalID)

      if(whoIsOn < urls.length-1) {

      whoIsOn++;

          holder.loadMovie(urls[whoIsOn]);

          caption.text = captions[whoIsOn];

      }

      }

        • 1. Re: clearInterval()
          srirama.83 Level 1

          I guess you want to pause something and resume it later . once you want resume just set the interval again.

          If you want to automatically resume the flow after some time, you can again call resume function in the setinterval and clear it in that resume function.

           

          Cheers,

          Sriram