Imagine a stack with a picture of an orange in its centre . . .
The picture: img "arancia", contains the following script:
on mouseDown
grab me
end mouseDown
so the end-user can move the picture wherever they want
all over the stack.
HOWEVER . . . I want to know whether their initial movement is to the
left, right, upwards or downwards.
Fantasy time again [pseudocode]:
on Grab
put the left of me into LEFT1
put the top of me into TOP1
wait 2 ticks
put the left of me into LEFT2
put the top of me into TOP2
if LEFT2 < LEFT1 then
put "LEFT"
else
put "RIGHT"
end if
if TOP2 < TOP1 then
put "UP"
else
put "DOWN"
end if
end Grab
Richmond.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode