At 2:02 PM -0400 5/26/05, Thomas W.J.C. McCrystal wrote:
On a whim, I tried a variation of Zav's sleep() trick, and it worked --
no beachball! Replace the "nothing" statement with sleep(1):

on test
  loopMore = 1
  repeat while loopMore
    if _key.keyPressed(SPACE) then loopMore = 0
    sleep(1)
  end repeat
  put "done"
end test

No beachball. I did a couple of tests to see if idle events are
generated, but they're not.

This would probably have no effect, but I wonder if you might get some idle events if you also issue an updatestage(?).

On a side note, I've found it handy to have a parent script that simulates frame cycles while in tight repeat loops. Initialize it with a psuedo frame rate then service it within repeat loops. Every "fake" frame cycle it'll call sleep(1) and issue updatestage to advance any filmloops on the stage (which also fires a stepFrame event for the actorlist). I use it in my authoring utilities.

--
Cole

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
lingo-l@penworks.com  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to