Try this: pressing the button once sets myVar = orange. Pressing again, set its value to null.
[AS]my_button.onPress = function() {
!checked ? this._parent.myVar=“orange” : this._parent.myVar=null;
checked = !checked;
trace(this._parent.myVar);
};[/AS]