Trouble with graphics display in OS X

Raymond E. Griffith rgriffit at ctc.net
Tue Jan 11 22:26:44 CST 2005


> I have been having a great deal of trouble switching over to OS X.
> 
> The following handler illustrates my problem:
> 
> on mouseUP
>    set the loc of grc "ball" to 100, 100
>    put .1 into dx
>    put .1 into dy
>    put the loc of grc "ball" into tBallLoc
>    repeat 5000
>      add dx to item 1 of tBallLoc
>      add dy to item 2 of tBallLoc
>      set the loc of grc "ball" to tBallLoc
>      --wait 1 millisec
>    end repeat
>    set the loc of grc "ball" to 100,100
> end mouseUP
> 
> In OS 9, this causes the ball graphic to  slide smoothly along a 45
> degree line. In OS X the ball moves erratically to two or three spots
> on the line and then quickly back to the starting location.
> 
> (Since the loc consists only of integers, this should move the ball
> smoothly through points 100,100 to 101,101 to 102,102 ... 600,600.)
> 
> If I insert the "wait 1 millisec" the motion is smooth, but slow. It
> takes, of course, 5 seconds plus.
> 
> Is this a known problem in OS X?
> 
> I am running RR 2.2.1 and OS X 2.3 on a PowerBook G4

Well, you might want to look at the drag command.

 set the dragspeed to 500
 drag grc "ball" from 100,100 to 600,600

And then there is the "move" command:

  move graphic "ball" to the points of graphic "path"

"move" also has an appropriate movespeed you can set.

Your difficulty is that you are trying too hard, and you are making the
objects do too much work. While OS X does have graphics difficulties that OS
9 does not, physically setting each movement consumes a lot of resources.

Let us know how drag or move work out for you.

Regards,

Raymond E. Griffith








> 
> Jim
> _______________________________________________
> 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