To detect shape events with KineticJS, we can use the on() method to bind event handlers to a node. The on() method requires an event type and a function to be executed when the event occurs. KineticJS supports mouseover, mouseout, mouseenter, mouseleave, mousemove, mousedown, mouseup, click, dblclick, dragstart, and dragend desktop events.
Instructions: Mouseover and mouseout of the triangle, and mouseover, mouseout, mousedown, and mouseup over the circle.
Code Editor
Modified on April 9th, 2013
by Eric Rowell