- Target: what the listener watches
- Listen to: what needs to happen to trigger the listener
- Action: what happens in response
Creating a Listener
Select the element you want the listener to respond to.
To listen for a view model property change or Rive event, select the artboard or nested component instead.
Target
The Target determines what the listener watches. The target can be an element in your scene, an artboard, or a nested component. Use an element as the target when you want to listen for interactions on that element, such as clicks or drags. Use an artboard or nested component as the target when you want to listen for view model property changes, Rive events, or other events that belong to that artboard or component.Opaque Target
Opaque Target controls whether pointer events stop at this listener’s hit area or continue through to elements behind it. When Opaque Target is enabled, pointer events stop at the target. When it’s disabled, pointer events can pass through the target and trigger other listeners underneath.Listen To
Listen to is the condition the listener watches for. When the condition is met, the listener is triggered. Listen to options include:- Pointer events, such as Click and Pointer Up
- View model property changes, when the target is an artboard or nested component
- Rive events, when the target is an artboard or nested component
We strongly recommend using Data Binding to communicate between artboards instead of relying on nested Rive events.
You can’t specify an expected value for a view model property change. The listener fires whenever the property changes, regardless of the direction of the change. For example, a Boolean listener fires whether the value changes from true to false or from false to true.
Listener Actions
A listener action runs when a listener is triggered. Actions include:- Changing a view model property
- Aligning an element to a target
- Reporting an event
- Triggering a scripted action
- Firing a Rive event
- Updating an input value (deprecated)