Shrink Image quickly
Sannyasin Sivakatirswami
katir at hindu.org
Mon Jan 6 01:11:01 EST 2003
In theory the following script should shrink an image 280 pixels wide
in under 1 second... but it takes forever... 3-4 seconds. Even setting
the "send in' down to 1 millisecond doesn't speed it up up... a
threshold is reached at about 20 ticks where setting it any lower does
not speed up the event at all... Goal is: shrink and image while is is
moving along a path, smoothly, quickly.
local imageRect
on mouseup
put the rect of image "shrinkTest" into imageRect
put imageRect
Shrinking
end mouseup
on Shrinking
put the width of img "shrinkTest" into x
if x = 20 then
restoreSize
exit Shrinking
end if
put the height of image "shrinkTest" into y
set the width of image "shrinkTest" to (x - 1)
set the height of image "shrinkTest" to (y - 1)
send "Shrinking" to me in 1 milliseconds
end Shrinking
on restoreSize
set the rect of image "Shrink Test" to imageRect
end restoreSize
More information about the use-livecode
mailing list