[squeakland] [Q] How to delay an execution of a command tile in a script

K. K. Subramaniam subbukk at gmail.com
Wed Nov 18 13:32:46 EST 2009


On Wednesday 18 November 2009 04:49:28 am Young-Jin Lee wrote:
> I am looking for a way to delay a certain action for a certain period of
> time. For instance, I have a book and want to flip the page when the mouse
> cursor is touch another Sketch. But, I want to delay the page flipping for
>  a certain period of time instead of doing it right away because I want,
>  for instance, to show a Text widget after the mouse cursor touched another
>  Sketch, but before flipping the book page. Without delaying the flipping
>  of a book page, I cannot even read the text in the Text Widget.
Use a dummy hidden morph to track delay (say line). When the mouse touches 
another sketch, display the text widget, set line's heading to 0 and get it to 
rotate (say 5 degrees a second). When the line reaches a preset heading, hide 
the text widget, flip the page and stop the script.

Subbu


More information about the squeakland mailing list