Canceling pending messages
gcanyon at inspiredlogic.com
Fri Jan 4 13:32:01 EST 2002
At 5:27 AM -0800 1/4/02, Jim Hurley wrote:
>The following script is recommended in the Rev. web site as preferable to the use of the idle message:
>put the currentTime of player "My Player" into field "Player Progress"
>send "showPlayerCurrentTime" to me in 500 milliseconds
>In this way, "showPlayerCuttentTime is repeated every 500 milliseconds.
>My question is: How would one stop this cycle? How does one interrupt the send routine? What part of the "pendingmessages" does one "cancel"?
Just change it to:
put the currentTime of player "My Player" into field "Player Progress"
send "showPlayerCurrentTime" to me in 500 milliseconds
set the pUpdateProgressMessage of player "My Player" to the result
Now you should be able to stop the process in any script with this command:
cancel (the pUpdateProgressMessage of player "My Player")
You can also use a global variable -- in fact, I always have. The property idea just occurred to me.
More information about the Use-livecode