---
title: "Motion and interactivity"
description: "Understand why the score describes movement while a state machine decides when that movement plays."
canonical: "https://terminal.lottiefiles.com/docs/concepts/motion-and-interactivity/"
last_updated: 2026-10-27
---

# Motion and interactivity

Understand why the score describes movement while a state machine decides when that movement plays.

The score (the timeline) gives a movement its frames and keys. Playing from the first frame
runs that movement in time. It does not wait for someone to press a button.

A state machine chooses a stretch to play. Markers name those stretches: **idle** can hold a
resting pose, **pulse** can play a reaction, and **success** can show a result. The same motion
can be reached by several rules without copying its keys.

Rules connect states. `press button → pulse` makes a pointer press choose **pulse**.
`ends → idle` returns after the movement finishes. An endless loop never reaches `ends`;
use a finite loop count or a different trigger if the state must move on.

Inputs let the host app take part. A number can count attempts, a Boolean can enable a
button, text can carry a result, and an event can signal a response. An emitted custom event
goes the other way: the animation tells the host app that something happened.

Trying the machine turns the stage into a player. A press interacts with the artwork rather
than selecting a layer. The active card and **WHAT HAPPENED** let you compare what you meant
with the rules the player took.

The machine travels in a `.lottie`. An ordinary Lottie JSON player can show the keyed
animation, but does not run its state machine. Choose
a dotLottie player with state-machine support for interactive delivery. A GIF or video
records frames; it cannot wait for input.

Next: [Make a button react to a press](https://terminal.lottiefiles.com/docs/how-to/make-a-button-react-to-a-press.md), then
[States](https://terminal.lottiefiles.com/docs/states.md) for the full controls and rule language.
