The following script works but I would like the cursor to be a cross during the movement, and it does not work: the cursor blinks from time to time during the movement but remains mainly in arrow.
Any idea?
Code: Select all
global PXCROP_ISMOVING
local gDeltaH, gDeltaV
on mouseDown
put true into PXCROP_ISMOVING
set cursor to cross ////////
show img "ImgToMove"
put (item 1 of the loc of img "ImgToMove") - the mouseH into gDeltaH
put (item 2 of the loc of img "ImgToMove") - the mouseV into gDeltaV
end mouseDown
on mouseUp
movePPend
end mouseUp
on mouseMove
if (PXCROP_ISMOVING) then
if (the mouseLoc is within the rect of group "GpeViewer") then
set cursor to cross ////////
set the loc of img "ImgToMove" to (the mouseH + gDeltaH) & comma & (the mouseV + gDeltaV)
else movePPend
end if
end mouseMove
on movePPend
global PXCROP_ISMOVING
put false into PXCROP_ISMOVING
end movePPend