On 2/9/12 12:16 PM, Richmond wrote:

I made a stack 1024x768 pixels and popped an image right in the middle
of it, and
put this in the script of the image:

on mouseDown
grab me
end mouseDown

on mouseStillDown
set the idleRate to 1
put the item 2 of the loc of me into LOK
if LOK > 0 then
set the width of me to LOK
set the height of me to LOK
end if
set the loc of me to 512, LOK
end mouseStillDown

on mouseUp
set the idleRate to 1
put the item 2 of the loc of me into LOK
if LOK > 0 then
set the width of me to LOK
set the height of me to LOK
end if
set the loc of me to 512, LOK
end mouseUp

certainly is achingly clunky on my P4, 3 GHz, 2 GB RAM running kinkified
Ubuntu.

I'm not surprised. That's not a good way to do it.

You should ditch the "grab" command entirely and use a mousedown to store the object reference in a local script variable, a mousemove message to calculate the new rect of the object if the variable isn't empty, and a mouseup to empty the variable so that mousemove won't do anything any more. You'll get a smooth response this way.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
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

Reply via email to