Demorize Digital Signage Software

17.5. Actions, Bookmarks and Conditions

A scene layer may contain actions, bookmarks and conditions. An action specifies a series of action functions that shall be executed when the action is triggered. A bookmark is a named location on a layer's timeline that can trigger an action when reached. A condition defines a logic expression that will trigger an action if it becomes true.

An action can be triggered by different things like bookmarks, conditions, button clicks and other events that occur in objects. When a presentation is running and reaches one of the bookmarks on the timeline, it executes the action that has been associated with the bookmark. An action can also be triggered through user interactivity with the presentation through the button objects that can be placed in a layer. Some objects also have actions associated with events that occur during their lifetime, such as the video object that can fire an action when the video it plays comes to an end. For layers, there are two special actions, named @Start and @End, that are executed at the start and end of the layer, if they exist.

A bookmark does not need to have an action associated with it. The bookmark can also be used by the action functions in an action. When an action is triggered it executes a sequence of functions that has been specified by the designer of the scene layer. These action functions may for example change the current timeline play position by jumping to a named bookmark. Bookmarks are added to a scene layer by either right-clicking on the timeline and added from its context menu or by right-clicking on the Bookmarks category under a layer in the project tree view. Actions are added from the context menu of the Actions category under a layer in the project tree view. For layers, there is a special bookmark, named @Index, that marks the position of the index frame used during index capturing in the player. The default index frame is the middle frame.

A condition consists of a logic expression and an action to trigger. The action is triggered when the expression becomes true. In order to trigger the action again, the expression needs to become false and then true again. The logic expression is evaluated using Lua, which means that it must be written using Lua syntax.

Example 17.2. Example condition expression that triggers once every minute

@{!system.time.sec} == 0


Example 17.3. Example condition expression that triggers when the user presses the space key on the keyboard

@{!system.keyboard.key:32} == true


Example 17.4. Example condition expression that triggers when a value in a data source is above a value

@{mydatasource.data:Price[0]} > 3.0