Mouse Clicks and Double-Clicks
Event Code can be triggers when the mouse is clicked on the control or double-clicked on it (note: A double-click also triggers click events first) <click>? I was clicked! <dblClick>? I was double-clicked!
The mouse position of the click can be accessed, so that drawings can be places based on them, or the coordinates can be checked to see if they fall withing a certain range of coordinates. <click>!this.drawCircle [this.mouseX],[this.mouseY],5,RED // Draw a red circle where clicked <click>!if { [this.mouseX] < 20 && [this.mouseY] <20 } !then !bell // sound bell if clicked in upper left of control
|