# About interval

**URL:** <https://forum.kirupa.com/t/about-interval/207957>\
**Category:** flash\
**Created:** [November 23, 2006, 3:28am UTC](https://forum.kirupa.com/t/about-interval/207957 "2006-11-23T03:28:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnboy0212](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cnboy0212](https://forum.kirupa.com/u/cnboy0212)\
**Post date:** [November 23, 2006, 3:28am UTC](https://forum.kirupa.com/t/about-interval/207957/1 "2006-11-23T03:28:37Z")

</div>

i created a button and a dynamic text box with variable “a” and here are my codes for the bottom:

on(realese){  
a = 5;

setInterval(countdown,1000);

function countdown(){  
if(a \> 0){  
a–;  
}  
}  
}

when i test it,the first time work all fine,the “a” decrease 1 every second,but the second time it just doesnt act how it suppose to be.is there something wrong with the interval?
