# Increasing variable

**URL:** <https://forum.kirupa.com/t/increasing-variable/32956>\
**Category:** flash\
**Created:** [October 13, 2003, 6:44pm UTC](https://forum.kirupa.com/t/increasing-variable/32956 "2003-10-13T18:44:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sprinkles](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@sprinkles](https://forum.kirupa.com/u/sprinkles)\
**Post date:** [October 13, 2003, 6:44pm UTC](https://forum.kirupa.com/t/increasing-variable/32956/1 "2003-10-13T18:44:10Z")

</div>

hi - im new 🙂  
I’m making a game sort of thing (my first) and can’t work out how to get a variable to increase by one on the click of a button. I have a dynamic text field which reads the variable (the variable is called percent)  
I have this code to increase the variable 1 every time the button is clicked, but when you press the button, the variable changes to 1 but will not increase anymore  
this is probably really simple!

[AS]  
on (release) {  
percent = +1;  
}  
[/AS]  
Thanks For help,  
richard
