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

Hide video component HTML5

Explorer ,
May 24, 2024 May 24, 2024

Hi,  I have a canvas with 2 video components. 

 

and 3 buttons,  firs button is to show first video and hide second.  second button is to show second video and hide first,

and third buttons is to hide both videos.

 

Show and hide works for the components at the beggining. but then it doesent work using the buttons.  only show works.

 

any help would be appreciated.


my code:


this.movieClip_1.visible = false;
this.movieClip_2.visible = false;


this.button_3.addEventListener("click", fl_ClickToHide.bind(this));

function fl_ClickToHide()
{
this.movieClip_2.visible = false;
this.movieClip_1.visible = true;
}

this.button_4.addEventListener("click", fl_ClickToHide_2.bind(this));

function fl_ClickToHide_2()
{
this.movieClip_2.visible = true;
this.movieClip_1.visible = false;
}

 

this.button_6.addEventListener("click", fl_ClickToHide_4.bind(this));

function fl_ClickToHide_4()
{
this.movieClip_2.visible = false;
this.movieClip_1.visible = false;
}

102
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
Community Expert ,
May 24, 2024 May 24, 2024
LATEST

are the video components children of movieclips?

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