I have 50 buttons on the stage. When each button is clicked, I’d like a different sentence inserted into a text box on the stage. When ever another button is clicked, a new sentence is inserted. 50 buttons, 50 sentences.
Could anyone give me some advice about achieving this?
Thanks so much for your reply. Yes, that is what I will do if I don’t find another solution. It’s just that I’ll end up with a freakishly complicated timeline with 100 layers and 50 transitions etc.
I'm not sure this will work, but it might be something to try. Make each button's "Unique Element ID" name the same as the sentence you want to enter.
Each button loads a custom JavaScript. That JavaScript changes the innerHTML of the text box to the name of the button clicked. The text box has an ID of "textbox"
Once again, I'm not sure this will work... but I'm thinking the code might look like (or something like) this...
I was so curious to see, if it should be done in hard way, so i made a tiny test.
This took something like 20 minutes to create and it worked for me. I’m not sure if this is what you are looking for, but how i understood it. Sry the crappy design, its just a test.ButtonsAndSentences.hype.zip (27,7 Kt)
With @ilkka_kumpunen’s permission I am uploading a copy that will work with the latest official release of Hype.
Glad to see you’ve found a solution. This will make it clear what ilkka was saying and available for anyone else that needs it. (Note* it is a template file).