Change button color multiple times


(Marthe Kalkhoven) #1

Hi!
I need some help with a little project. I’m using Hype for a few years now, but still javascript and coding are not my strongest suit.

What I want is enable students to mark words in a sentence. So I’ve made a button of each word.
On click I want it to change to yellow > blue > red > back to white. So each time you click, the color changes. How can I do that? I think/hope it should be possible.

Thanks in advance!

Mark text test.zip (29.7 KB)


#2

Why not use timelines?

Mark text test 2.zip (29.4 KB)


(Marthe Kalkhoven) #3

Thank you for replying!

Yes, that’s possible, but I was hoping that with javascript it would be easier and less work. Because I have to make several lessons and each lesson has about ten sentences. That’s a lot of timelines :wink:


#4

First post:

Second post:

No mention in your first post of multiple sentences or multiple lessons. Always good to express the full intent of your needs right from the start. :star_struck:


(Marthe Kalkhoven) #5

Totally true…Sorry :blush:


#6

Well, it depends. You can put 1 sentence in a timeline. Use a symbol if you like. Copy and paste the scene, change the words and “Klaar is Kees” :wink:
Mark text test 3.zip (29.7 KB)