Okay, I have on the main frame:
stop();
score.text = 0;
health.text = 100;
displayTime = 10;
_root.onEnterFrame = function() {
displayTime -= 1/60;
if (_root.score.text == "4") {
gotoAndPlay(4);
}
if (_root.health.text == "0") {
gotoAndPlay(1);
}
if (_root.displayTime.text == "0") {
gotoAndPlay(1);
}
};
When score is 4 it will go to frame 4, when health is 0 it will go to frame 1.
But the displayTime doesn't go to frame 1 when it is 0.
I think it is because when displayTime -= 1/60; works out the time, it is make it like 9.99999999999 and not rounding up, how do I make it round up. There is a way but I forget what it goes like?