# 2 Questions. (scoredisplay, and timer)

**URL:** <https://forum.kirupa.com/t/2-questions-scoredisplay-and-timer/277423>\
**Category:** flash\
**Created:** [December 11, 2008, 9:02pm UTC](https://forum.kirupa.com/t/2-questions-scoredisplay-and-timer/277423 "2008-12-11T21:02:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tic](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@tic](https://forum.kirupa.com/u/tic)\
**Post date:** [December 11, 2008, 9:02pm UTC](https://forum.kirupa.com/t/2-questions-scoredisplay-and-timer/277423/1 "2008-12-11T21:02:27Z")

</div>

Hi,

I’ve made a game, and its pretty much finishd.  
Now I have one problem.  
I have a working scoring system. That when you hit you gain points, miss is lose points. It works fine. Only problem is, then when you start. So before you hit/miss You have 0 points, but those points don’t show. Theyre not visible. (if you go to or below 0 later it remains visible) So its only at the start. Anyone know how I can have the starting score visible?

the 2cnd question is. I would like to add a timer to my game.  
Like you start with 60secs. Then you see the timer go down each second. And after 60 seconds the timer hits 0 and the game stops.

Anyone know how to do this, or has a tut to that?  
Thnx.

The code for the score is

```auto
package {
    //Importeer benodigde classes.
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;

    public class Score extends Sprite {
        public var myScore:TextField = new TextField();
        public var myFormat:TextFormat = new TextFormat();

        //Maak constructor functie.
        public function Score() {
            this.myScore.text=String(0);
        }
        public function Updatescore(Score) {
            //Zorgt voor de score.
            this.myScore.text=String(Score);
            myScore.x=660;
            myScore.y=30;
            myScore.selectable=false;  
            addChild(myScore);

            //Zorgt voor de textopmaak.
            myFormat.color=0xFFFFFF;
            myFormat.size=24;
            myScore.setTextFormat(myFormat);
        }
    }
}

```
