Loop Action

image\Action_Programming_Loop.jpg

The Loop action allows you to set up an action (or series of actions) to perform repeatedly, either a set number of times or indefinitely.

Setting up the Loop action:

1. Add the Loop action to your trigger, as described in adding actions. The Loop tab will automatically appear when you add the action.

2. Use the Loop until page changes option if you want the sub-set of actions in the loop to play continuously until the user opens a new page in the publication. By default, this option is selected.

3. Use the Loop box if you want the sub-set of actions to play for a set number of times. Use the spin buttons to set a specific number of times you want the loop to play.

4. Use the Loop while condition is true option if you want the sub-set of actions to play until an OpusScript evaluates when the loop should finish.

Note:

You can enter any valid expression into the Script Editor provided. The script could be one line of code or several lines of code that result in a FALSE answer. If your expression contains a variable, you can use the New Variable button to create the variable and then use it as part of your expression.

5. The Loop only when object visible option will ensure that the sub-set of actions will only loop while the object which triggered them (set in point 1 above) is visible on-screen.

Note:
This option can be used whichever radio button you selected in the Loop tab (as described in points2 to 4 above).

6. Click on the Apply button to save your changes.

7. Now add your actions to the Loop action – see Adding a Sub-set of Actions for more information.

Related Topics:

Introducing the Programming Actions

Choosing an Action