PDA

View Full Version : Timer goes up



gaming monkey
October 13th, 2004, 06:04 PM
Hi, I've been searching this site for a while trying to find what I want but still can't find the answer.

Basically, what i would like is start a timer on frame 2, timer goes up, and it stops when my hero hittests an enemy.

So, I dont want it to countdown, instead it would count up every second.

Any links or code would be very helpful.
Thanks.

Moopers
October 13th, 2004, 06:46 PM
Try using the getTimer(); command

Look it up on the flash help menu if you don't know how to use it.

Dr Warm
October 14th, 2004, 04:58 AM
if ur using Flash MX there's an example that comes with it of making a stopwatch type thing, just copy and paste the code for that

gaming monkey
October 15th, 2004, 01:36 PM
I'm using mx 2004, i can't find any examples, can someone who uses mx show me some code or any links.
Thanks for any help.

Dr Warm
October 15th, 2004, 07:30 PM
ok i've attached the timer.fla that comes with flash, then i've posted a game (not finished obviously) that uses it as an example, hopefully so u can see how to implement it

Dr Warm
October 16th, 2004, 04:35 AM
also check out this thread at flashkit.com here (http://www.flashkit.com/board/showthread.php?threadid=448865&highlight=timer), from just looking at it its alot better, but i have checked if it counts up, but it has an example fla to look at as well

gaming monkey
October 16th, 2004, 08:19 AM
Wow, thank you very much Dr Warm, they were great!

Thank you so much, they were perfect!

Dr Warm
October 16th, 2004, 09:10 AM
No probs, just for future reference though there is a search function ;)

lbeetles
November 25th, 2004, 02:26 PM
Do you know how to do a timer that counts upwards from a certain date?

Dr Warm
November 27th, 2004, 08:43 PM
do u mean via php, on the net?

lbeetles
December 1st, 2004, 06:55 PM
It can use anything, what im after is a timer to start from say 30/11/2004 at 12:00am. Do you know how to do this???

Dr Warm
December 1st, 2004, 08:11 PM
do you want it in days:hours:minutes or something like that?

I hate time maths (need my base 10!), but if you look at getDate() function you might be able to work it out!

Jake69
December 2nd, 2004, 01:24 AM
I'm using mx 2004, i can't find any examples, can someone who uses mx show me some code or any links.
Thanks for any help.hey the default place for this to be is C:\Program Files\FlashMx\samples
atleast thats where abouts it is(i deleted flash for sum um reason so im not exactley sure) BUt search there

JoMan
December 2nd, 2004, 09:57 AM
Also, There is a timer tutorial that is counting down until Christmas:

http://www.kirupa.com/developer/mx/countdown.htm