|
-
10 minute countdown
Hi all,
Im trying to make a 10 minute countdown with white numbers and black background.
just need minutes, seconds and milliseconds
hope anyone can help in sending a fla file or in telling me the easiest way to do this. I dont need a start button or anything else, just the countdown and when time is over just the numbers as 00:00:000
Thanks
-
Flash/Flex Developer
Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.
-
Hi samuc1068
The problem with thos tutorials is that all of them talk about countdowns to a specific date in the future an I only need it for 10 min.
i will use this in my Bar telling everyone that the bar is closing in 10 min and countdown till 00
Thanks in advance and sorry for answering to late
-
Hi samac1068
The problem with thos tutorials is that all of them talk about countdowns to a specific date in the future an I only need it for 10 min.
i will use this in my Bar telling everyone that the bar is closing in 10 min and countdown till 00
Thanks in advance and sorry for answering to late
-
What version of Flash and Actionscript are you using?
Last edited by dawsonk; 02-06-2011 at 06:34 PM.
-
-
 Originally Posted by dawsonk
What version of Flash and Actionscript are you using?
Im in MX 2004 version, but if I need to update to another flash and actionscript just let me know
Thanks a lot
-
PHP Code:
var tx:TextField = new TextField();
addChild(tx);
const COUNTDOWN:uint = 6000000; // 600000 ms = 10 minutes
addEventListener(Event.ENTER_FRAME, function(e:Event):void{
var d:Date = new Date(Math.max(COUNTDOWN - getTimer(), 0));
var minutes:String = String(d.minutes);
var seconds:String = String(d.seconds);
var milliseconds:String = String(int(d.milliseconds * 100) / 100);
while(minutes.length < 2) minutes = '0' + minutes;
while(seconds.length < 2) seconds = '0' + seconds;
while(milliseconds.length < 3) milliseconds = '0' + milliseconds;
tx.text = minutes + ':' + seconds + '.' + milliseconds;
});
Please use [php] or [code] tags, and mark your threads resolved 8)
-
 Originally Posted by neznein9
PHP Code:
var tx:TextField = new TextField();
addChild(tx);
const COUNTDOWN:uint = 6000000; // 600000 ms = 10 minutes
addEventListener(Event.ENTER_FRAME, function(e:Event):void{
var d:Date = new Date(Math.max(COUNTDOWN - getTimer(), 0));
var minutes:String = String(d.minutes);
var seconds:String = String(d.seconds);
var milliseconds:String = String(int(d.milliseconds * 100) / 100);
while(minutes.length < 2) minutes = '0' + minutes;
while(seconds.length < 2) seconds = '0' + seconds;
while(milliseconds.length < 3) milliseconds = '0' + milliseconds;
tx.text = minutes + ':' + seconds + '.' + milliseconds;
});
Thanks a lot.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|