8.5

Table Of Contents
The If, Else, and End If actions enable you to create conditional statements. In this case, a
sound is played if Animation 2 is playing; otherwise, the computer beeps.
If and End If actions must always be used together.
Using a loop in a script
A loop is a programming structure where a statement or series of statements is repeated
over and over, usually until a condition is satisfied. Two types of loops are available in
Interactive layouts: Loop loops and While loops.
A Loop loop (created with the Loop, Break If, and End Loop actions) repeats a series of
actions until a particular condition (specified in the Break If action) is satisfied. For example,
you can use a Loop loop to keep asking a student a question until he or she gets it right.
A While loop (created with the While and End While actions) repeats a series of actions
as long as a particular condition (specified in the While action) is satisfied. For example,
you can use a While loop to play an animation until the end user moves the mouse pointer
off of the window.
To create a Loop loop or While loop:
1
In the Script tab of the Interactive palette, create a script.
2
To begin the loop statement, do one of the following things:
For a Loop loop, add a Loop action (Control > Loop).
312 | A GUIDE TO QUARKXPRESS 8.5: PLUS EDITION
INTERACTIVE LAYOUTS