myBehavior.mouseEvents in Anark Studio 2.5

Does the object to which this behavior is attached respond to mouse events?

Property Type
Boolean

Indicates whether the object to which this behavior is attached can be clicked on. This property works in conjunction with the clickable property of Nodes and the Mouse Event Handlers to make models in the scene clickable.

Defaults to false.

In order for a model to receive mouse events, it must meet the following criteria:

  1. The clickable property of the model and all of its parents must be set to true.
  2. The model must have a behavior attached to it and that behavior must have the mouseEvents property set to true as part of the onAttach function or anytime after that. If the model is part of a group, then the behavior can be attached to the group instead.
  3. The behavior must have at least one Mouse Event Handler set up.

If the behavior is attached to a group, then all child objects within the group (and any children of those objects, etc.) would be clickable, as long as each model has clickable set to true.

For more information, see "Enabling objects to receive mouse events" on page 139 of the Anark Studio 2.5 user manual.