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?