Currently playing around with universal action triggers. This little clips uses
mouseup. This can obviously also be done with the regular Hype actions inspector, but making it more general is certainly fun and specially extendable (like changing events on the fly and more).
In the following example, I am using a single
flash() function that continues a timeline forward or backwards based on the
mousedown. One could also just use two custom events and do it all in Hype without a single line of code.
These are implemented so far (but not all tested):
// mouse events ( MouseEvent ):
'mousedown', 'mouseup', 'click', 'dblclick', 'mousemove', 'mouseover', 'mousewheel', 'mouseout', 'contextmenu',
// touch events ( TouchEvent ):
'touchstart', 'touchmove', 'touchend', 'touchcancel',
// keyboard events ( KeyboardEvent ):
'keydown', 'keypress', 'keyup',
// form events:
'focus', 'blur', 'change', 'submit'