Drag n Drop Objects in Flash vs. Rev

Roman Opendak ropendak at comcast.net
Thu Dec 4 12:57:06 EST 2003


> Is there a way to simulate:
>
>    Repeat until the mouseClick
>
> without monopolizing the CPU?
>
> This repeat loop is useful when you want the user to be able to click
> the mouse to stop or interrupt screen activity.
>
> Jim


here's a script that takes up 50 % of the cpu time... heh, heh
it goes in the cd script

on opencard
  global counter
  put 0 into counter
end opencard

on idle
  global counter
  add 1 to counter
  if counter >= 2 then
    put 0 into counter
    repeat with i = 1 to number of cd btns
      set the loc of cd btn i to random(height of this cd), random(width of
this cd)
    end repeat
  end if
end idle

its not exaclty game speed but its great for making things blink!



More information about the use-livecode mailing list