Control Rectangle Opacity via Button


(Travis Best) #1

I am sure this is very easy but I am very new to Hype3 and javascript I want to be able to change the opacity of a rectangle via two buttons on to make to increase the opacity and one to decrease could someone please point me in the right direction.


#2

Do you want to change the opacity gradually via a timeline or using javascript?

D

opacityChange.zip (18.8 KB)


(Mark Hunte) #3

The simplest way is to use a timeline.

You can set the timeline to increments and have the buttons play it forward or in reverse. The timeline will pause at each increament

Opacity.hype.zip (10.9 KB)