1 Reply Latest reply on Aug 20, 2008 4:06 PM by Rothrock

    Cancelling a wait function

      I have this wait function applied to a frame:

      function wait() {
      var myInterval = setInterval(function () {
      }, 26*1000);

      and I would like to cancel this wait function, when a button is clicked. This is a skip button that takes you to a frame label, but I need to somehow cancel that wait function or it still takes affect in the movie. Could someone help with the code that needs to be added?

        • 1. Re: Cancelling a wait function
          Rothrock Level 5

          That is what is needed to cancel the interval. However your variable, myInterval, is internal to the wait function and I'm not sure if it will be available to the scope of whatever button you use to cancel it. So be sure to check the scope.