Answered
scope problem within class with onPress
Hi there.. I have a class in which there are properties (IE -
_myColor).
Now suppose withing my class I have an onPress function defined...
IE
targetMc.myBtn.onPress = function():Void {
trace("The current value is: " + _myColor);
}
Now obviously this will not work because it is out of scope.
What is the proper way to access said property from the onPress that resides IN the class file as well?
Thanks!
Now suppose withing my class I have an onPress function defined...
IE
targetMc.myBtn.onPress = function():Void {
trace("The current value is: " + _myColor);
}
Now obviously this will not work because it is out of scope.
What is the proper way to access said property from the onPress that resides IN the class file as well?
Thanks!
