Hi, beginner at flash here and need some help.
Making a small game, and the object of the game is to get as far as you can and a timer is counting the seconds you last.
Basically when you hit an object the game ends and goes to another screen (keyframe) and asks if you want to play again or not.
What i want is the timer to record the score and display it on the following screen, is there anyway i can do that?
My code for the actual timer is as followed:
reset();
timerint = setInterval(timer,1000);
function timer(){
_root.timesec++
secs = _root.timesec % 60;
mins = _root.timesec;
mins = mins - secs
mins = mins / 60;
if(isNaN(mins)) mins = o;
if(length(mins) == 1) mins = '0' + mins;
if(length(secs) == 1) sesc = '0' + secs;
_root.secs1=secs
_root.timetxt = mins + ':' + secs
}
Thanks.
Making a small game, and the object of the game is to get as far as you can and a timer is counting the seconds you last.
Basically when you hit an object the game ends and goes to another screen (keyframe) and asks if you want to play again or not.
What i want is the timer to record the score and display it on the following screen, is there anyway i can do that?
My code for the actual timer is as followed:
reset();
timerint = setInterval(timer,1000);
function timer(){
_root.timesec++
secs = _root.timesec % 60;
mins = _root.timesec;
mins = mins - secs
mins = mins / 60;
if(isNaN(mins)) mins = o;
if(length(mins) == 1) mins = '0' + mins;
if(length(secs) == 1) sesc = '0' + secs;
_root.secs1=secs
_root.timetxt = mins + ':' + secs
}
Thanks.