While building Mochi , I ran into a problem that a lot of us hit eventually: making something happen is easy. Controlling when it happens, how long it lasts, and what comes before and after is the hard part. It usually starts innocently enough: If an application opens, play this animation If the mouse moves here, make this happen And that works... for a while. Then the software grows up a little, and the questions get harder: What happens when a user clicks whi...