Questions about Button Functionality Multi function based on point in timely e

I am new to Javascript in Hype, but have used it for a while. I thought this would work:

set id to mainButton, created a javascript, and set it for timeline action.

image

However the text is not showing as 'Pause' in the animation (previewed in safari.) I figure I am doing something basic wrong, and will figure it out. Hints help.

However, I would like to have the SAME button do different things based upon the point in the timeline. I figured I could have 3 different buttons and swap them out, but I don't want to do this.

At the beginning the item will start the timeline and say Start
during it will say Play/Pause
At the end it will say "Next" and go to next scene.

I was thinking of setting a variable at different points of the timeline, but not sure I can do that and switch the objects onclick action. I was thinking of a single action based upon point in timeline, and toggle play pause.

Lastly, I noticed that when I have multiple timeline actions at the same point, they are stacked on top of each other, and I have to temporarily move them apart to find the one I want. Is there a more efficient way to see an overview of "stacked diamonds?"

Works for me but there is the pitfall if you ever assigned a hover states changes will be reset on hover (as a button has hidden timelines running with instant changes and resets). That said, you can use any rectangle as a button and change the text.

Doh. ID. too much database work of late.

2 Likes

Fo those of you who missed it.

getElementByID

Should have been

getElementById

4 Likes