Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

how do I can stopping this timer function?

$
0
0

Hi,

I use this script for change Slider value.

but when I close script and open again the timer is not answer and I have to close and open again.

Is there a code for stopping timer function?

 

Gtlym = new Object();

Gtlym.CALL = new Object();

 

Gtlym.guid = function() {

     var s4 = function() { return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); };

     return s4() + s4() + s4() + s4()  + s4()  + s4() + s4() + s4();

}

 

Gtlym.setInterval = function(func,millis){

     this.guid = Gtlym.guid();

     Gtlym.CALL["interval_"+this.guid] = func;

     app.scheduleTask('Gtlym.CALL["interval_'+this.guid+'"]();',millis,true);

}

 

 

//Example:

Gtlym.setInterval(function (){timeSlider.value++;

 

  

   if (timeSlider.value>=98)timeSlider.value=1;

    },10);


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>