On 10/9/12 7:08 PM, Timothy Miller wrote:
on mouseUp
put "537,1" into locVar
repeat with i = 1 to 650
set the loc of field "foo" to locvar
add 1 to item 2 of locVar
wait 1 millisecs
end repeat
end mouseUp
It works, but it takes a whole lot longer than 650 milliseconds for
the loc of the field to scroll to the bottom -- more like ten seconds,
and it does not scroll smoothly.
Besides the one millisecond wait, there is also the time it takes to
redraw the field and its contents every time through the loop. That adds
overhead.
The "move" command is optimized animation, and is only one line:
move field "foo" from 537,1 to 537,650 in one second
There's other variations you can use, take a look at "move" in the
dictionary. You can move things using exact positions, or relative
positions, in a certain amount of time, or at a certain speed.
--
Jacqueline Landman Gay | [email protected]
HyperActive Software | http://www.hyperactivesw.com
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode