Conditions

An mbedlet or player can have multiple handlers. Conditions define the circumstances under which a message triggers a particular handler.

When a handler receives a message, the mbedlet checks to see whether conditions are associated with the message. If a condition exists, the mbedlet evaluates it. If the condition evaluates to "true," the mbedlet fires the handler.

To associate multiple conditions with the same message, put them in the order you want them evaluated. Conditions are evaluated from the top of the Handlers window to the bottom. As soon as a condition evaluates to true, the handler fires. No more conditions are evaluated.

A condition has the following form:

value comparator value

where comparator is one of the following:

The handlers above are defined for a button player. A user clicks the button and generates the MOUSEDOWN message. The condition evaluates the value of another player in the mbedlet, the control player ($CONTROL1) as follows:



Previous Page Next Page