Example:
Loading and playing a different AVI

Actions used:

AVI Object - Get Property

AVI Object - Is Visible

AVI Object - Load

AVI Object - Play

AVI Object - Seek

AVI Object - Stop

Control Structure - END IF

Control Structure - GOTO

Control Structure - IF

Control Structure - LABEL

In this example, we'll change the video that is currently playing in an AVI Object, set the position to the 50th frame, and then play the video. Finally, we'll display the filename of the video in a Text Object so the user will know what file they're watching.

Here's what the action list looks like:

First we use an "AVI Object – Is Visible" action to make sure that the AVI Object is not hidden.

That 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 don't want to load another video in the object, since the object isn't even visible (we'll assume that the object was hidden on purpose).

So, we use an IF action to test whether %IsVisible% was set to FALSE...

...and if it was FALSE, we use a GOTO action to jump to a "SkipActions" label (that we'll put at the end of our action list).

Then we use an "AVI Object – Stop" action to stop the currently playing AVI video.

Then we use an "AVI Object – Load" action to load a new video into the AVI Object.

Then we use an "AVI Object – Seek" action to set the position of the AVI video.

Then we use an "AVI Object – Play" action to start playing the video.

Then we use an "AVI Object – Get Property" action to set the filename of the video to a variable.

Finally we use a "Text Object – Set Text" action to display the filename of the video in the Text Object named "Text1" on this page.

And we mustn't forget to set the target for our GOTO action with a LABEL called "SkipActions".

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)