Head In A Pan
July 24th, 2007, 12:15 AM
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?! :)
_global.myVariable = this;
btn_first.onRelease = function(){
_global.myVariable.property="First";
trace(myVariable);
}
btn_second.onRelease = function(){
_global.myVariable.property="Second";
trace(myVariable);
}
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?! :)
_global.myVariable = this;
btn_first.onRelease = function(){
_global.myVariable.property="First";
trace(myVariable);
}
btn_second.onRelease = function(){
_global.myVariable.property="Second";
trace(myVariable);
}