Copy link to clipboard
Copied
I'm putting something together with an HTML5 canvas. I want to be able to hide and reveal certain movieclips by clicking on buttons. This is a really simple thing I've done several times in the past with actionscript3 but I'm not sure how to translate it HTML5. The code I used to use was "Instance_Name.visible=false" or "Instance_Name.visible=true"
Does anybody know the HTML equivalent of that?
Thanks
this.Instance_Name.visible = false;
Copy link to clipboard
Copied
this.Instance_Name.visible = false;
Copy link to clipboard
Copied
Thanks! That works....I've encountered something weird now though. To make that movieclip visible again I have a Mouse Click Event Handler applied to a button, but for some reason it's not working and I can't see why...
The code looks like this:
this.AlienVaderBTN.addEventListener("click", fl_MouseClickHandler_4.bind(this));
function fl_MouseClickHandler_4()
{
this.AlienVader.visible = true;
}
Copy link to clipboard
Copied
Wait....seem to have figured it out...had it in the wrong place on teh timeline
Find more inspiration, events, and resources on the new Adobe Community
Explore Now