Whoops. Posted too soon. Here's a slightly different version with a sprite as cursor, and a slight off-by-one bug fix. ^_^;