Revolution much slower then Hypercard

Ian Summerfield iansummerfield at btconnect.com
Tue Feb 12 09:07:01 EST 2002


I made a few changes that make a huge difference.  Mainly drag is much much
much faster than click at

on mouseUp
   select card image 1
   delete card image 1
   put 300 into XX
   put 300 into YY
   put 200 into RR
   choose brush tool
   set brush to 32
   set brushcolor to "blue"
   put -((pi/2)-(pi/584)) into Rad
   put 1.5*pi into dest -- don't calculate the loop destination each time
   put (2*pi)/584 into pi2 -- don't calculate the increment each time
   set lockmessages to true -- actually little difference
   repeat until Rad>=dest
     put XX+RR*cos (Rad) into x
     put YY+RR*sin (Rad) into y
     drag from x,y to x,y
     add pi2 to Rad
   end repeat
   set lockmessages to false
   choose browse tool
end mouseUp


> Ken,
> 
> Can you speed this up?
> 
> on mouseUp
> select card image 1
> delete card image 1
> put 300 into XX
> put 300 into YY
> put 200 into RR
> choose brush tool
> set brush to 32
> set brushcolor to "blue"
> put -((pi/2)-(pi/584)) into Rad
> 
> repeat until Rad>=1.5*pi
>   click at XX+round(RR*cos (Rad)),YY+round(RR*sin (Rad))
>   add (2*pi)/584 to Rad
> end repeat
> 
> choose browse tool
> end mouseUp
> 
> There's slow and then there's slow.
> 
> Nelson
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the Use-livecode mailing list