I have little information and experience with Action Script. I want to use that experience to create a flash stop countdown timer that does not only stops at 00.00 but also in a specific time. this make take some time to do but I hope someone in here can offer some assistance.
How to create a flash stop countdown timer?
Hi
Please refer following actionscript code.
Var targetdate:date = new Date(2010,8,25,15);
addEventListner(event.enter_Frame, loop);
Function loop(E:event):void
{
Var nowdate:date = new date();
Var ms:number = targetdate.gettime() – nowDate.gettime();
Var sec:Number = Math.floor(ms/1000);
Var min:number = Math.floor(sec/60);
Var hr.Number =Math.floor(min/60);
Var day:Number = Math.floor(hr/24);
Sec=sec % 60;
Min = min % 60;
Hr = hr%24;
Daytxt.text=day.tostring();
Hrtxt.text=(hr<10)? “0”+ hr.tostring() : hr.tostring();
mintxt.text=(hr<10)? “0”+ min.tostring() : min.tostring();
sextxt.text=(hr<10)? “0”+ sec.tostring() : sec.tostring();
}
Thanks & Regards
Mckinney Ma