Skip to main content
Inspiring
Dec 16, 2024 2:11 PM UTC
Question

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

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;
}

    This topic is closed to new replies. Start a new post to keep the conversation going.

    4 replies

    Inspiring
    Dec 16, 2024 8:27 PM UTC

    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.

    Translate
    kglad
    Community Expert
    Community Expert
    Dec 17, 2024 2:43 AM UTC

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

    Translate
    kglad
    Community Expert
    Community Expert
    Dec 16, 2024 2:26 PM UTC

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

    Translate
    Inspiring
    Dec 16, 2024 8:22 PM UTC

    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?

    Translate