[squeak-dev] "Resettable" Delay?

tim Rowledge tim at rowledge.org
Sun May 19 22:09:07 UTC 2019


Given that you are unlikely to managed high precision timing in any of this (tell us if that is what you were hoping!) the simplest answer is probably to use Morphic stepping timers.

On mouseEnter, have your morph start stepping and set the interval to suit the needs of the startup delay. Come to think of it, there may just possibly be a method to say "next step at time t" but I'm not an expert in that arena. when the morph steps, you start the sound. If you were for example using shortish sounds and want to change them as time goes by you might also use the steps to do that changeover.
On mouseLeave, you could potentially stop the soundplayer to go silent, or just leave the sound to run out?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- His spirit guide is a three-toed sloth.




More information about the Squeak-dev mailing list