State machines and interactions
State machines connect animation states through transitions. Use them when a scene should respond to a parameter or event, such as moving from an idle state to a confirmation animation.
In this section
Parameters
Create named runtime inputs with defaults and ranges, then connect them to animation behavior.
Events & actions
Connect clicks, drags, markers and playback events to explicit actions in the scene.
Motion bindings
Connect an input value to a layer property, timeline progress or another parameter with explicit ranges.
Wires & expressions
Build an expression-based relationship between compatible values and inspect validation feedback before applying it.

Open the state machine workspace#
Switch from Canvas to State Machine, or use the toolbar's state-machine control. The timeline still owns the animation tracks; the state machine describes how states select and transition between animations.
Start with clearly named timelines and states. Keep a simple idle-to-active example before adding several transitions or conditions.
Parameters and events#
Parameters carry values used by the scene. Transitions can respond to configured conditions or events. Match names and types between the authoring setup and the host application.
The JavaScript runtime exposes setParam(name, value) and dispatch(event, machineId?). Dispatching a name only works when the exported state machine defines the corresponding behavior. Calling a method does not create a missing transition.
Test the interaction#
- Inspect the initial state and the animation it references.
- Trigger the intended event or parameter change in preview.
- Check both the transition and the final state.
- Repeat the interaction and check how it returns to idle.
- Export and repeat the check in the target player.
Editor and runtime releases can differ in supported features. Keep the editable source, inspect runtime export warnings and test with the exact SDK version you intend to ship.
For procedural scene changes, use the existing scripting guide. For application-side playback, continue with the JavaScript runtime.