2 buttons showing 2 different colors of an item

Hi everyone,
quite new to hype and everything related to java, css and so on. Just playing around right now and would like to create an faded animation between 2 identical pictures (just the color of the item is different) by pressing an corresponding colored button on the site. (just like in an online store for sunglasses where you can go through the different colors of them).
Any help highly appreciated - would love to see a demo file if possible

Thanx in advance
saints

hi saints,

the other way round :slight_smile:
you may provide your solution approach so others can help.

oh, ok I’ll try (don’t even know right now if that works :D)
so I do have 2 buttons and would like to fade between the 2 pictures on the left. Thought I could do it with the timeline, but then when I’m pressing a button twice, the fading will show up again even thought it is already showing the correct picture. So maybe there is a different way to solve my little problem I can’t even think about off right now.

Thanks again…

ButtonSwitchView.zip (246.7 KB)

ButtonSwitchView.hype.zip (226.1 KB)
hypes onlinedocumentation is really good.
tipp: have a look!

Thanx a million!
Seems that I used it wrong somehow. Just a new Timeline solved the problem :smiley:
Does that mean, that if I would have more then 2 pictures (and buttons) it would work the same way or would there be another easier way?

Will check the documentation as well. :smiley:

regards

Have a look at hypes Javascript API