# 1151: a conflict exists with definition timer\_txt in namespace interval

**URL:** <https://forum.kirupa.com/t/1151-a-conflict-exists-with-definition-timer-txt-in-namespace-interval/316908>\
**Category:** flash\
**Created:** [December 6, 2010, 2:39am UTC](https://forum.kirupa.com/t/1151-a-conflict-exists-with-definition-timer-txt-in-namespace-interval/316908 "2010-12-06T02:39:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superninja](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@superninja](https://forum.kirupa.com/u/superninja)\
**Post date:** [December 6, 2010, 2:39am UTC](https://forum.kirupa.com/t/1151-a-conflict-exists-with-definition-timer-txt-in-namespace-interval/316908/1 "2010-12-06T02:39:38Z")

</div>

Yeah, so, I’m pretty dumb when it comes to AS3. I’ve never really done any coding before AS3, so it’s pretty tough for me. ☹

Anyways, this should be easy for someone nice to fix. This is just a simple timer that I can’t get to work. Thanks! 😃

> // CUSTOM

// Create the two variables.

var minute = 0;  
var second = 0;

// Create the timer  
// Checks the clock function every 1000 milisecond (1 second)  
var timer\_txt:Timer = new Timer(1000);  
timer.addEventListener(TimerEvent.TIMER, clock);  
timer.start();

// Function that increments the timer  
function clock(evt:TimerEvent):void {  
// every time this function is checked increment second by one  
second += 1;  
// If the second is 59  
if(second \> 59){  
// The minute will be plussed with 1  
minute += 1;  
//and the zero will be set to 00  
second = 00;  
}  
// Displays the time in the textbox  
Timer.Text = String(“Time is: [”+minute+“:”+second+“]”);  
}
