Hi
I am just trying to understand the scope of [COLOR=“Blue”]this[/COLOR] in AS3 for example in AS2
basicM_btn.onRelease = function() {
this._visible = false;
}
Would hvae made the button invisible
In AS3 I was expecting to write the same thing as this
function clickHandler(event:MouseEvent):void {
this.visible = false;
}
menuA_btn.addEventListener(MouseEvent.CLICK, clickHandler);
However this sets all of the content on the stage to visible = false
Is there a difference in the way that [COLOR=“blue”]this [/COLOR]works in AS3
Thanks for your help