RE" Trouble with graphics display in OS X

william griffin bill at igame3d.com
Wed Jan 12 02:30:50 CST 2005


You can not set the loc of an object
  or the rect of an object or, anything that uses integers (ie pixels)
with floats, Its just bad news.

>
>    put .1 into dx             ---you have floating point numbers in 
> HERE
>    put .1 into dy             ---you have floating point numbers in 
> HERE
>
Works well (but not perfectly smooth, a flaw in rev I think, maybe that 
animation library could help)
This way, the same as your repeat but without the awful repeatness.

on mouseUP
doSlide
end mouseUP

on doSlide
   put the loc of grc "ball" into tBallLoc
   if item 1 of tBallLoc < 500 then
     add 1 to item 1 of tBallLoc
      add 1 to item 2 of tBallLoc
  set the loc of grc "ball" to tBallLoc
  send doSlide to me in 1 millisec
  else
     set the loc of grc "ball" to 100,100
  end if
end doSlide

You will get the same exact results (and movement/animation flaws) with 
this script

on mouseUP
   move grc "ball" from 100,100 to 500,500 without messages
set the loc of grc "ball" to 100,100
end mouseUP


Ok There you go. :) Good Luck.

Mr Bill



More information about the use-livecode mailing list