Welcome Guest [Log In] [Register]
Welcome to Brackenwood. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
can't stop game timer; timer runs in background
Topic Started: May 9 2006, 07:10 AM (158 Views)
gemmytots
Brackenwood Newbie
hey all...

i am producing e-learning and in it i have games. I have a problem with one of my games that once navigated away from the timer continues to run the background, and once expired jumps back to keyframe 3 (see code below)

goTime = function () { timer--;if (timer<1) {game = false;gotoAndStop(3);}};

I was wondering how i reset the variables back to 0 when i navigate away from this scene - without completeing the game.

Any help would be greatly recieved!

Gemmytots
Offline Profile Quote Post Goto Top
 
juggleballz
Member Avatar
I'm loose, full of juice and ready for use!
Yo gemma, welcome aboard, Rach give u the link yeah?
(Paul here)

try this, on the button you use to navigate away from the game add this code:

Code:
 
on (release) {
_root.timer.stop

}


or
Code:
 
on (release) {
_root.timer = 0

}


hope it helps, again I its best too look at it and experiment to give you the answers you need. Hope u work it out. ;)

Paul
Offline Profile Quote Post Goto Top
 
gemmytots
Brackenwood Newbie
Hey paul,

yeah thanks rach did!

I'm gona give it a try later and see how I get on. TBH at this stage my brain is melting and I can't wait to finish!!

Cheers for the advice,

See you later ;)

gem
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Actionscript · Next Topic »
Add Reply