look in the scripting index, under MouseBox. The sample script for SetClick is a tiny sketchpad.
while you are looking at MouseBox, check out the SetDropTrack script. Classic game.
Along with the other samples that ship with JMP, there is a set of 3D samples. Look in Samples/Scripts/Scene3D. Check out the RatMaze JSL sample. (Read the 2nd paragraph of the comments before running it.)