Object moves to point

Hi All,

Anyone have any good idea for making an object move to a position when a button is clicked. Please take a look at the attached hype example

object moves to point-2.hype.zip (15.4 KB)

You’ll want to hook into the Hype API and use hypeDocument.setElementProperty

On Mouse Click of a button choose Run Javascript and then use hypeDocument.getElementById() and hypeDocument.setElementProperty() to get the element you want to use and then set it’s left and top properties with an added duration to animate it or 0 to not.

1 Like

If they are fixed/known positions, you could use Relative Keyframes on secondary timelines. Then just Start the timeline when a button is clicked. Otherwise @DBear’s suggestion of hypeDocument.setElementProperty() in the Hype API is the way to go.

1 Like