Critter

Jim Lyons jimlyons at earthlink.net
Sat Aug 21 22:17:36 EDT 2004


Got time to play for a few minutes? Create a new stack and make an oval 
graphic about 32 by 32 pixels. Set its arcAngle to about 330 degrees. 
Set the _stack_ script to:

on mouseMove x,y
   if x,y is within the rect of grc 1 then exit mouseMove
   get the loc of grc 1
   set the startAngle of grc 1 to \
       -180*atan2( (y-item 2 of it),(x-item 1 of it) )/pi \
       + (360 - the arcAngle of grc 1)/2
   move grc 1 to x,y without waiting
end mouseMove

Play with the move speed. Enjoy. Now get back to work. ;^)

Jim Lyons



More information about the use-livecode mailing list