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

components video --> visible.true button works, visible.false button doesn't?

Explorer ,
Dec 16, 2024 Dec 16, 2024

Copy link to clipboard

Copied

Hi guys, trying to create 2 simple buttons to make a components video visible or not visible. The visible button works but once the video is visible, my button to make it invisible is not working ? Anyone have experience with this?

Site:

https://cryptomemes.fun/vidTrial/

Code :

this.vidTrial.visible=false;

 

this.visible.addEventListener("click", makeVIS.bind(this));
function makeVIS()
{
this.vidTrial.visible=true;
}

 

this.invisible.addEventListener("click", makeINVIS.bind(this));
function makeINVIS()
{
this.vidTrial.visible=false;
}

Views

63

Translate

Translate

Report

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 ,
Dec 16, 2024 Dec 16, 2024

Copy link to clipboard

Copied

 $("#video").css('visibility','hidden');  

Votes

Translate

Translate

Report

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 ,
Dec 16, 2024 Dec 16, 2024

Copy link to clipboard

Copied

Thanks for the reply. I took what little you said there and tried to make something of it.

I found this video - https://www.youtube.com/watch?v=CxTo1RUdJYM

So I dragged a CSS component to the desktop, named it, created a CSS file and attached it to the CSS component.

I then pasted the code you gave me into the CSS file, after changing the name to my movie component instance name.

But, I have no idea how to run that CSS code when I press my button?

Votes

Translate

Translate

Report

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 ,
Dec 16, 2024 Dec 16, 2024

Copy link to clipboard

Copied

Before I saw kglad's response, I found a work around.  I made an invisible movie clip, put the movie player component inside this invisible clip on frame 1 and called it's instance name with the buttons. Movie player appears and disappears perfectly. I want to wait a bit to see if this is the best way.

Votes

Translate

Translate

Report

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 ,
Dec 16, 2024 Dec 16, 2024

Copy link to clipboard

Copied

LATEST

if you're happy with the results, leave it.

Votes

Translate

Translate

Report

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