Action move the mouse

Hi! I’m creating my website with Hype and I need some help to figure out how can I animate some objects in the scene with the mouse movement.
For example, I have a scenario in the background with elements distributed in the layers of the timeline.When I move the mouse to the left I would like that the objects move to the right, at different speeds. I need to make it looks like 3D, with depth in the scene.
Hope to hear from you soon!
Best Regards,

HI Gustavo @guto

For this you would need to set up your timelines with the animation you want. Then create some javascript to track the mouse movement and call the startTimlimeNamed() function so that the animation will play as your mouse moves. (perhaps you could create a way of moving the timeline as your mouse moves rather than play it but that is pretty technical and I don’t know how well you understand Javascript)


1 Like

I know nothing about Java, but I can understand that your suggestion seems to be better . Use the timeline and not the object.

I’m doing a really cool project in Hype , when I can just show . Not knowing much of Java have limitations.

Thank you for answers and the team Tumult Hype can help me would be very grateful .

thank you

Personally, I’d not use a mouse movement to activate the animation because the end user would be moving the mouse and that may cause a lot of confusion as each move would trigger it. Maybe a mouse over, click, or touch would be better in this case. Here’s a sample with a mouse down action to move two elements at different speeds. (no javascript, just timelines) (12.4 KB)

Hello Greg , thank you for helping me. Cool the file you sent me . But I am sure of what I need . I will try to explain better :

I’m in a scene three objects that make up a scenario : a tree, an animal and a mountain in the background.

If I can do this objects move very little when the User move the mouse left or right will be a reality in the scene. I do it a lot when I need to make a video appearance by using images. A parallax effect.

I do not write English well , sorry .

Again thank you if you can help me.

Good night (I’m in Brazil … lol )

Here’s another demo with a javascript to detect the mouse movement. But as you’ll see, any mouse movement will relaunch the timeline animation. If that’s OK, then this may work for you. (10.2 KB)

Hello , after searching all night I found a perfect example of what I need . A please look at :

It will be perfect for the idea of ​​the site . Of to make this effect?
If so, can continue to help me and do a favor for example.

thank you

I just think in the forum what I wanted :