Variable in Hype

(haytham) #1

Hi All
Is there a way to give the button 2 or 3 different behaviors depend on the time or the time line.

(Rick) #2

Well you could have that button continue a timeline then pause it with an action (do this or that) on the pause spot then continue same timeline with same button to the next pause/action spot etc.



RE: your use of “time” are You referencing a time~date in the “real” world (days, hours, minutes, etc.).

If so You can do this with Javascript.

Here are two links that describe using the “Date object”:

Do a search on the Forum for “date” you will get a myriad of hits that show various uses of the Date object.


Thanks @JimScott

This library might also be helpful:

(haytham) #5

I am sorry for all, but i mean time on time line, as i want when i press button in first time go to any time line that i created inside hype document and if it there then the click will me another method, if statement, so can any one guide me :slight_smile:


Can you provide a bulleted list with what you want to happen? I’m having trouble following you. Something like:

  • When you click an object, do X
  • If the ‘Main Timeline’ timeline has played longer than 10 seconds, do X