[RESOLVED] timer and setInterval
Hello,
I'm trying to get a movie clip to automatically load up another external clip, after playing an embedded flv.
This is what I've tried so far:
var holdFrame = setInterval( holdFrame, 5000);
gotoAndPlay(
_root.mc_holder.loadMovie("swf/library.swf"));
clearInterval (holdFrame);
Although it throws no errors, the setInterval is ignored and it just loads direct into the next mc clip.
Can anyone shed some light as to where I'm going wrong?
Thanks
Are You Looking for this?
PHP Code:
var intervalId:Number;
var count:Number = 1;
var maxCount:Number = 1;
var duration:Number = 5000;
function executeCallback():Void {
trace("executeCallback intervalId: " + intervalId + " count: " + count);
if(count >= maxCount) {
clearInterval(intervalId);
}
count++;
}
intervalId = setInterval(this, "executeCallback", duration);
Note:
This code is from adobe help under actionscript 2 "ActionScript language elements > Global Functions > setInterval function".
marlopax