# Counting Vars

**URL:** <https://forum.kirupa.com/t/counting-vars/187085>\
**Category:** flash\
**Created:** [April 26, 2006, 4:49pm UTC](https://forum.kirupa.com/t/counting-vars/187085 "2006-04-26T16:49:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter71](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@Peter71](https://forum.kirupa.com/u/Peter71)\
**Post date:** [April 26, 2006, 4:49pm UTC](https://forum.kirupa.com/t/counting-vars/187085/1 "2006-04-26T16:49:01Z")

</div>

Hey, I want to create a var (Number) that increases by one every time a button is pressed, up to a certain point. After that I want it to return to 1. I have virtually no idea how to do this, so I figured I would ask and see if anyone has any hints. Thanks all and have an excellent day!
