Showing a hidden element with a button

I found a post which show how to hide an element with a button here:

However I have an element which is hidden (using the inspector) and I need to show it using a button. Is there a way to do this other than using the timeline?

Thanks.

Set the elements opacity to 0% and use this script on the button

hypeDocument.setElementProperty(appear, 'opacity', 1, 1.0, 'easeinout');

The above is taken directly from Hype’s scripting window, check it out - you’ll discover a lot of handy pre-written actions in there…

hypeDocument.setElementProperty(element, 'propertyName', value, 1.0, 'easeinout')
1 Like

Just want to clarify - @Antiphones are You requesting a show~hide using the "display" property where the element is removed from the Scene (no interactivity at all)? As compared to @gasspence's "opacity" suggestion in which the element is not removed from the Scene but is simply rendered invisible; however it still can interact as part of the Scene - such as reacting to a "Mouse Over" action (even though it's invisible).

I ask this because the thread Antiphones was referencing was discussing the use of the "display" property.

1 Like

Check out https://www.w3schools.com/css/css_display_visibility.asp

1 Like