If you are trying to coordinate multiple animations’ playback at runtime,
consider using a state machine instead to do this for you!
Choosing starting animations
Starting animations can also be chosen when Rive is instantiated. The first animation on the artboard may play if one is not provided, or a state machine is not set.Controlling playback
Playback of each animation and state machine can be separately controlled. You can play and pause playback using theplay , pause and stop methods, either passing in the names of the animations you want to affect or passing in nothing which will affect all instanced animations.
Invoking Playback Controls
Very similarly to Web, you can pass in Rive params and callbacks for certain animation events. See the Web tab for some examples of callbacks you can set. Additionally, you can use therive object returned from the useRive hook to invoke playback controls.
See the example below here: https://codesandbox.io/p/sandbox/adoring-sea-n7m59f