# Adding time to a countdown/timer

**URL:** <https://forum.kirupa.com/t/adding-time-to-a-countdown-timer/219840>\
**Category:** Uncategorized\
**Created:** [March 20, 2007, 4:54pm UTC](https://forum.kirupa.com/t/adding-time-to-a-countdown-timer/219840 "2007-03-20T16:54:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [March 20, 2007, 4:54pm UTC](https://forum.kirupa.com/t/adding-time-to-a-countdown-timer/219840/1 "2007-03-20T16:54:58Z")

</div>

Hey guys, need a little help with something. I’m making a game and it has a 20sec timer in it and I want to make a button/powerup thing that adds 5 seconds to the timer when you press it.

I’m currently using: -

```auto

timerBTN.onPress = function(){
	_root.countdown += 5; 
	gotoAndPlay (2); 
}

stop();

```

This doesn’t work, is there something wrong with my code, or is my method not the best? Any help would be really helpful.

Thanks 🙂
