How are you doing?
My first post here and please pardon for my language...hope you dont mind?
I am into Actionscripting but slowly learning python and it`s fun!
my first question.
How to call a function using timer/interval in python?
I need to call a function over and over again using timer inbetween.
for example in actionscripting:
Code: Alles auswählen
var intervalId:Number;
var count:Number = 0;
var maxCount:Number = 10;
var duration:Number = 2000;
function executeCallback():Void {
trace("executeCallback intervalId: " + intervalId + " count: " + count);
if(count >= maxCount) {
clearInterval(intervalId);
}
count++;
}
intervalId = setInterval(this, "executeCallback", duration);
regards
reverse