Speed of 'sliding a field'
Ian Summerfield
iansummerfield at btconnect.com
Wed Apr 3 17:16:14 EST 2002
I have a G3 450MHz running OS X Revolution 1.1.1b2. It took 27 ticks to
run. BUT, I was missing the effect - is that what you mean by choppiness?
I added an "unlock screen" before the "end repeat", the effect is nicer.
I also added a timer, here's the revised script:
on mouseup
put 135 into startX
put 82 into startY
put 20 into startH
put 134 into startW
put 403 into endX
put 227 into endY
put 310 into endH
put 246 into endW
put endX-startX into netX
put endY-startY into netY
put endH-startH into netH
put endW-startW into netW
put 0 into x
-- remember the time this loop started
put the ticks into starttime
repeat 25 times
add 4 to x
put ((x/100)*netX)+startX into nowX
put ((x/100)*netY)+startY into nowY
put ((x/100)*netH)+startH into nowH
put ((x/100)*netW)+startW into nowW
set the width of field "list1" to the round of nowW
set the height of field "list1" to the round of nowH
put the round of nowX into nowX
put the round of nowY into nowY
set the loc of field "list1" to nowX,nowY
-- unlock screen redraws the screen
unlock screen
end repeat
-- puts into the message box the time taken in ticks to run the loop
put the ticks-starttime
end mouseup
On 3/4/02 8:24 am, "David Kwinter" <dk42 at mac.com> scribed:
> I've been frustrated by slowness lately whenever I've tried to make a
> Rev script do anything dynamic. Am I doing something wrong? I doubt my
> G4 lacks enough power to do some of the things I want to do. Here, for
> example is a chunk of script which slides a field into position. If you
> try it out let me know if you don't mind the choppyness. Is there a
> solution?
>
More information about the use-livecode
mailing list