Setting a global variable from within a function?

Hello!

I thought the following was how I set a global variable from within a function, but I’m not getting a trace on it…

So how do I set a global variable from within a function?! :slight_smile:


_global.myVariable = this;

btn_first.onRelease = function(){
_global.myVariable.property="First";
trace(myVariable);
}

btn_second.onRelease = function(){
_global.myVariable.property="Second";
trace(myVariable);
}