PDA

View Full Version : Help - Countdown Timer Loop


spurtniq
09-12-2003, 11:31 AM
What I'm trying to do is:

Have a loop repeat say, 25 times.

Within that loop, I want a countdown timer
up to 500, like so:

First loop

1 (outer)
480 to 500 (inner - timer 481, 482, 483, etc)

Second Loop

2 (outer)
460-500 (inner - timer 461, 462, 463, etc)

Third Loop

3 (outer)
440-500 (inner - timer 441, 442, 443, etc)
...

Final Loop
25 (outer)
1-500 (inner - timer 1, 2, 3, etc)

based on simple math (25x20 = 500)

So every iteration should be a multiple of 20

Every time the outside loop increments the
inside countdown timer interval should get larger
thereby SLOWING the process down. Once the
outside loop reaches 25 I want the process to stop.

So it starts out fast, small interval and then slows
down, large interval, and ultimately stops.

I'm having problems wrapping my mind around
the code.

Should it be some if-then loops, if-then-else, for,
or while loops or something completely different?

Thanx.

spurtniq
09-12-2003, 12:14 PM
I should add that how I hope to apply this
is, I've got action in one scene. From that
scene it's goes to another scene where the
counter is. The counter is incremented as
stated above. Then it goes back to the
first scene. Until the counters reach respectively
25 / 500. At which point ALL action stops.

Make sense?

spurtniq
09-12-2003, 09:06 PM
here's what I got.

I looked at the random pop effect and
it looked too consistent to me, so I tried,
and succeeded in generating a more random
effect.

Now what I'd like to do is have it more
closely resemble the process of popping
corn. That is to say, it starts out fast,
then eventually slows down to a trickle
then stops. When it stops, all letters should
be the same size.

That, I think, would be best accomplished by
loops, but NOTHING I've found yet has been
of much help.

Here's my SWI:

Random Popcorn Effect (Swi - Zipped, 2k) (http://mywebpages.comcast.net/mmeroom/random_popcorn.zip)

abc_4183
03-04-2005, 11:49 PM
hi every one
can u help me in makeing a counter timer ... for example time is 25 it should be decrement till 0 then content should dislplay like when preloader finishes then the content comes up like jpg image ,or movie ...or url hope u getiing my point so like this if time 25 comes till 0 then content should come up ..!