ForumsProgramming ForumMaking a reverse timer

7 4853
splatbert
offline
splatbert
5 posts
Nomad

How do I make a Timer that just keeps adding instead of sunbtracting?
e.i. going like 1, 2, 3, 4 ETC instead of
going like 4, 3, 2, 1.

  • 7 Replies
methelod
offline
methelod
49 posts
Nomad

Soemthing with a de in the beggining I think

splatbert
offline
splatbert
5 posts
Nomad

i dont know how to decrement

pengper
offline
pengper
9 posts
Nomad

what are you using? i know that in Microsoft stuff (like VB etc) you add a timer, set the interval to 1000, and put in something along the lines of:

new sub X

dim x as integer

If timer1.tick then x + 1

mind you, I've not used it in donkeys, so there are probably a number of faults with that :P

I would help if it was with flash but i dont know about timers in flash- im something of a flash n00b :P sos

rjbman
offline
rjbman
215 posts
Nomad

Why would you resurrect all these old threads?

manny6574
offline
manny6574
922 posts
Nomad

yea loads of old ones came to the front, but then some of those turn into good dissucsions

Darkroot
offline
Darkroot
2,763 posts
Peasant

Sigh pengper or this broken forum anyway might as well kill this thread with a solution.

var timer:Timer = new Timer(1000); timer.addEventListener(TimerEvent.TIMER, onReverse);
timer.start();

function onReverse(event:TimerEvent) {
countText.text = String(3 - timer.currentCount); }

You will need a dynamic textbox oh as3 how much I missed you.

Darkroot
offline
Darkroot
2,763 posts
Peasant

ops

function onReverse(event:TimerEvent) {
countText.text = String(3 - timer.onReverse); }

Showing 1-7 of 7