You can configure a
final state, which when entered indicates the system has reached the end:
This can be detected by:
tostate to the state machine's
This example uses a
change handler to update the animation, and a
complete handler to log to the console.