Drag object with finger

Hello

I am new to hype and ibook author. I have been doing a lot of reading, but I am still unclear on how to get certain things done in hype.

How do you make an object (a shape or a picture) created in hype once you make the hype file become and ibook widget. I have only managed to make objects moved based on animation, not drag object.

I also would like to know if on hype a picture can be used as a button to trigger animation ?

Thank you so much in advance for your time.

Sincerely

Pierre

I believe the missing key to both of your queries is in the Actions Inspector.

If you want to make an object draggable, you can select the element, and then add an On Drag action that is set to Control Element Position. Hype does not handle drops, so you would need to chain an action that is set to Run Javascript… and runs code to handle with the drop. You should be able to search the forums for various solutions to how you want to handle dropping.

To have a button trigger an animation, you would add an On Mouse Click action that is set to Start Timeline (or Continue Timeline if you are resuming playback state) and then choose either the Main Timeline or make a new timeline that has just the animations that you want run.

I suggest checking out the relevant portions of the documentation:

https://tumult.com/hype/documentation/3.0/#actions
https://tumult.com/hype/documentation/3.0/#timelines

Hello Jonathan

Thank a lot for your reply.
I check out the links you sent and managed to do what I wanted. Thank you so much

1 Like