# Exponential Variables

**URL:** <https://forum.kirupa.com/t/exponential-variables/256947>\
**Category:** flash\
**Created:** [April 9, 2008, 1:18am UTC](https://forum.kirupa.com/t/exponential-variables/256947 "2008-04-09T01:18:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esoltas](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@Esoltas](https://forum.kirupa.com/u/Esoltas)\
**Post date:** [April 9, 2008, 1:18am UTC](https://forum.kirupa.com/t/exponential-variables/256947/1 "2008-04-09T01:18:30Z")

</div>

Hey guys, I’ve given the following scenario a good try, and I’ve looked at other people’s questions on flashkit, but none seem to address my issue enough that it can be applied to my situation. Because I am now stumped on this scenario, I can’t offer much actionscript to correct.

In the \_root, I have some variables. For the examples sake, these are:  
var ab=1;  
var bc=2;  
var cd=3;

I also have a button on-screen. It’s instance name is “hello”. It has the following actions:  
on (release){  
this.\_parent.double(this.\_parent.ab);  
Also in the \_root is a function, which aims at doubling a variable selected by a button.  
Essentially, it needs to work like this:  
function double (inputVar){  
inputVar\*=2;  
trace(ab);  
//Here’s the problem. It isn’t re-assigning inputVar to ab, so ab stays as 1, instead of becoming 2, then 4, and 8, and so on. How would I do this?  
}

Any ideas?
