When onExit Runs
Here’s the sequence:- Event occurs (learner taps, moves, makes a choice, etc.)
- Condition is checked (if any). If true, transition is allowed.
- onExit actions run (in the order you defined them)
- Transition actions run (actions on the transition itself, if any)
- onEntry actions of the next state run
- Next state is fully set up and waiting for interaction
Common onExit Actions
Adding onExit Actions

On Exit tab with cleanup actions — Stop Audio and Stop Video ready to run when the learner leaves this state
Select a state on the canvas
In the Properties panel, select the On Exit tab
Click the Add Action button
Select the action type you want
Configure the action
Pairing onEntry and onExit: Setup and Cleanup
A best practice is to pair onEntry actions with corresponding onExit actions. If you set something up in onEntry, clean it up in onExit.Example: Audio Setup and Cleanup
State 1: “Listen to Instructions”Example: Visual Guidance
State 2: “Identify the Problem”Example: Object Position Reset
State 3: “Move the Pump”Saving Progress with onExit
Use onExit to save important data before moving to the next state: Example: Tracking Correct Answers State 4: “Quiz Question 1”attempts + 1.The Complete Execution Sequence
Here’s a detailed example to show how onExit, transitions, and onEntry work together: Scenario: Learner is in “Move the Pump” state. They successfully move the pump, triggering a transition to “Confirm Position” state.onExit Best Practices
Always stop audio in onExit
Always stop audio in onExit
Hide things you showed in onEntry
Hide things you showed in onEntry
Reset object positions if needed
Reset object positions if needed
Use onExit for scoring and tracking
Use onExit for scoring and tracking
Keep onExit actions minimal
Keep onExit actions minimal
Test the transition carefully
Test the transition carefully
Common Mistakes to Avoid
Next Steps
Learn about:- Entry Actions (onEntry) — Set up states with onEntry
- Conditional Transitions — Combine events, conditions, and transition actions
- Variables — Track data you save in onExit

