Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Hiding and unhiding movieclips in HTML5

Explorer ,
Jun 19, 2017 Jun 19, 2017

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

1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Jun 19, 2017 Jun 19, 2017

this.Instance_Name.visible = false;

Translate
Advocate ,
Jun 19, 2017 Jun 19, 2017

this.Instance_Name.visible = false;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 19, 2017 Jun 19, 2017

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;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 19, 2017 Jun 19, 2017
LATEST

Wait....seem to have figured it out...had it in the wrong place on teh timeline

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines