# Int to String?

**URL:** https://forum.kirupa.com/t/int-to-string/320716
**Category:** Uncategorized
**Created:** [March 31, 2011, 3:17am UTC](https://forum.kirupa.com/t/int-to-string/320716 "2011-03-31T03:17:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![taint](https://avatars.discourse-cdn.com/v4/letter/t/b5a626/32.png) [@taint](https://forum.kirupa.com/u/taint)
#### Post date: [March 31, 2011, 3:17am UTC](https://forum.kirupa.com/t/int-to-string/320716/1 "2011-03-31T03:17:51Z")

</div>

I’m creating my own timeframe for my game.  
I’m having problems regarding in converting my Int into String  
how should I work with it?  
and how can i display it? I’m using a text tool for the movie clip.

```auto

package {

    import flash.events.Event
    import flash.events.TimerEvent;
    import flash.utils.Timer;
    import flash.utils.getTimer;
    import flash.display.MovieClip;
    
    public class Time extends MovieClip{
        private var myTimer:Timer = new Timer(120);
        private var sec:int;
        private var min:int;
        private var hou:int;
        private var day:Number;
        var s:String;
        var m:String;
        var h:String;
        
        public function Time() {
            myTimer.addEventListener(TimerEvent.TIMER,onTime);
            myTimer.start();
        }
        
        public function onTime(e:TimerEvent):void{
            sec+=1;
            if(sec >= 60){
                min+=1;
                sec = 0;
                if(min >= 60){
                    hou+=1;
                    min = 0;
                    if(hou >=24){
                        hou = 0;
                    }
                }
            }
            trace(sec = "sec");
            trace(min + "min");
            trace(hou + "hou");
        }

    }
    
    
}

```
