-
How to Add Time Left to Final Score
Hey, can someone help this is killing me.
I have a score that goes up by 10 every time you press this button, its var "score".
I have a simple countdown timer. caller, its var "timer".
When the game ends it goes to the next frame which says game end. I can get the score to show but I want the time left to be added to this.
I am kind of new to this.
I have tired
onEnterFrame (){
score = Number(score) + timer;
}
Nothing seems to work
Do I even actually use onEnterFrame ?
-
Prid - Outing
Don't use onEnterFrame (though, you use it like this: onEnterFrame = function(){), because it's a loop, and it will keep executing those codes. What I'd do, would do the same, just without the onEnterFrame
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
-
I tried putting this in the final frame
score = Number(score) + 25;
I know the above works with a button "onRelease" function but it does not seem to work when the timeline gets to the final frame.
Don't I need some code that states when the timeline gets to the final frame or will the code only execute on the final frame if the code is on that frame itself?
-
Prid - Outing
That code will be executed, first and only once, when it first appears. So yeah, it needs to be on the Last Frame!
I am back, guys ... and finally 18 :P
BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|