Example:
Playing an AVI

Actions used:

AVI Object - Is Visible

AVI Object - Play

Control Structure - ELSE

Control Structure - END IF

Control Structure - IF

Page - Show Object

In this example, we'll show you how to play the currently loaded AVI Object even if it's hidden.

Here's what the action list looks like:

First we use an "AVI Object - Is Visible" action to find out whether the AVI Object is hidden.

This sets the value of the variable %IsVisible% to either TRUE or FALSE, according to whether the AVI Object is currently visible or hidden. (If the object is hidden, we'll need to show it before we start playing it.)

Next, we use a "Control Structure - IF" action to test whether %IsVisible% was set to TRUE.

Since we want to do one thing if the AVI object is visible, and another if the AVI object is false, we need to use a "Control Structure - ELSE" action to split the IF block in two. The "Control Structure - ELSE" action divides the IF block into two parts: the part above the ELSE, that will be used if the IF statement is true; and the part below the ELSE, that will be used if the IF statement is false.

The first part of the IF block (i.e. the part between the IF action and the ELSE action) happens if the video isn't hidden. In that case, we just need to use an "AVI Object - Play" action to play the video.

The second part of the IF block (i.e. the part between the ELSE action and the END IF action) happens if the video isn't visible. In that case, we need to use a "Page - Show Object" action to make the object visible before we play it.

Then we can play the video using an "AVI Object - Play" action.

Here's a link to the finished example, as an AutoPlay Media Studio 4.0 actions XML file that you can import into an action list:

(Note: save this file to your hard drive and use a tool like WinZip to extract the XML file)