Snap images to location....
Monte Goulding
monte at sweattechnologies.com
Tue Jun 3 14:25:01 EDT 2003
Try this:
on mouseDown
set the borderWidth of the target to 7
end mouseDown
on mouseUp
set the borderWidth of the target to 1
end mouseUp
on mouseRelease
set the borderWidth of the target to 1
end mouseRelease
on mouseMove x,y
if the borderWidth of the target = 7 then
set the loc of the target to min(max(x,150),160),min(max(y,85),100)
end if
end mouseMove
Cheers
Monte
>
> Hi All...
>
> I'm trying to snap an image using the "grab me" comand and a
> mouse up handler...
>
> as in...
>
> on mouseDown
> grab me
> set the borderWidth of the target to 7
> end mouseDown
>
>
> on mouseUp
> set the borderWidth of the target to 1
> get the loc of me
> put it into tempLoc
> put item 1 of temploc into theX
> put item 2 of temploc into theY
> if thex < 160 then
> if thex > 150 then
> if theY < 100 then
> if theY > 85 then
> put "good job"
> else
> if thex < 395 then
> if thex > 370 then
> if theY < 95 then
> if theY > 70 then
> put "New good job"
>
> end if
> end if
> end if
> end if
>
> end if
> end if
> end if
> end if
> end mouseUp
>
> Obviously, this script is not working... but there must be an
> easier way that works :-)
>
> TIA!
>
> John Patten
> Tech Dept
> SBCUSD
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list