how do you make a timer for 6 minutes
Printable View
how do you make a timer for 6 minutes
whaddaya want? a timer counting upwards/downwards? a command that calls a function after 6 minutes?
counter:
call after 6 minutes:Code:var inter:Number;
var minutes:Number = 0;
var seconds:Number = 0;
function showCounter():Void{
if (seconds==60){
seconds = 0;
minutes++;
}
if (minutes == 6){
clearInterval(inter);
}
textFieldName.text = minutes +":"+seconds;
seconds++;
}
showCounter();
inter = setInterval(showCounter, 1000);
Code:var inter:Number = setInterval(myFunction, 3600);
function myFunction():Void{
trace("Six Minutes are over");
clearInterval(inter);
}
Hey!Quote:
Originally Posted by theTick
I have developed a .FLA using the script given in your post, and I am attaching the same. This .FLA seems to be OK!
PLease give your comments.
Thank you!
no .fla attached...
[edit] there it is...
could you open the fla?
It was developed in FLASH8
everything works fine for me...