layer.states.add "newState", width: 500, didEnter: () -> alert("OMG!")

Added some didEnter / willEnter / didExit / willExit events for layer state changes, which you can add when you create the states. Yay!

In future it'd also be cool to be able to set didEnter on an already-created state.