# Changing variables with buttons

**URL:** <https://forum.kirupa.com/t/changing-variables-with-buttons/191835>\
**Category:** flash\
**Created:** [June 23, 2006, 10:58am UTC](https://forum.kirupa.com/t/changing-variables-with-buttons/191835 "2006-06-23T10:58:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chargrims](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@chargrims](https://forum.kirupa.com/u/chargrims)\
**Post date:** [June 23, 2006, 10:58am UTC](https://forum.kirupa.com/t/changing-variables-with-buttons/191835/1 "2006-06-23T10:58:27Z")

</div>

Hi there,

I am trying to code buttons to change the value of ‘myValue’.

This is the code I have;

```auto
 
this.onRelease = function(){ 
 
myValue = 1
 
}

```

Is there a function I need to put in front of myValue?

Thanks
