FORUMS: list search recent posts

How to stop the timer

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Manny Rellesiva
How to stop the timer
on Dec 4, 2008 at 12:09:12 pm

Im trying to create a stopwatch in a game and saw this link and was very helpful:

Howver, my problem is how to stop the timer? Is there any function or method/property in Flash to stop the time/r? Thanks in advance


Return to posts index

Graham Quince
Re: How to stop the timer
on Dec 6, 2008 at 8:47:13 am

I'd do this by creating a go-nogo option.
On your starting frame, set nogo = "no";
On your start countdown button, above your start timer code put this line in:
_root.nogo = "go";

On your countdown code, frame it all with this 'if' statement:

if (_root.nogo == "go") {


Then on your pause button simply use:

_root.nogo = "no";

This might need refining and you'll have to something for starting the timer again. I'm not at my flash PC right now, but there's a couple of different ways to sort out the unpause button. (either a second play statement or visisble/invisible buttons)

Hope that helps

Graham - Free FX for amateur films

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved