Action Editor

Each event represents something that can happen at run time. When an event is triggered, any actions that were added to it will be performed.

Note: Some events contain special event variables that are local to the event and contain more information about the event.

Here are all of the possible events in AutoPlay Media Studio:

On Audio

On Click

On Close

On Double-Click

On Enter

On Finish

On Focus

On FSCommand

On Key

On Leave

On Loaded

On Navigate

On Pause

On Play

On Preload

On Show

On Select

On Shutdown

On Startup

On Stop

On Timer

 


 

On Audio

The actions that will be performed whenever an audio channel's state changes on the page. For example, if a channel's audio is paused, this event will be triggered.

The following event variables are automatically set whenever this event is triggered:

e_Channel

(number) The audio channel whose state has changed. One of the following channel values will be returned:

CONSTANT

VALUE

DESCRIPTION

CHANNEL_BACKGROUND

5

Background audio channel.

CHANNEL_EFFECTS

0

Effects channel (used for mouse over, down, and click sounds).

CHANNEL_NARRATION

6

Narration channel (used for voice overs).

CHANNEL_USER1

1

User channel 1. (Only available in the Professional edition.)

CHANNEL_USER2

2

User channel 2. (Only available in the Professional edition.)

CHANNEL_USER3

3

User channel 3. (Only available in the Professional edition.)

CHANNEL_USER4

4

User channel 4. (Only available in the Professional edition.)

CHANNEL_ALL

-3

All audio channels.

e_State

(string) The state that the audio channel has changed to. One of the following states will be returned:

VALUE

TYPE

DESCRIPTION

Finish

string

The audio channel's track reached it's end.

Pause

string

The audio channel was paused using the Audio.Pause action.

Play

string

The audio channel was played using the Audio.Play action

Stop

string

The audio channel was stopped using the Audio.Stop action.

On Click

The actions that will be performed when the user clicks on this object.

On Close

The actions that will be performed whenever the page is closed.

On Double-Click (Pro edition only)

The actions that will be performed when the user double-clicks an item in the listbox.

On Enter

The actions that will be performed when the mouse moves onto this object ("enters" the object's territory).

On Finish

The actions that will be performed whenever the video reaches the end in a video object.

On Focus (Pro edition only)

Note: This event is available for input objects and listbox objects in your project.

The actions that will be performed whenever the object is given focus. For example, it will be given focus if the user clicks inside the object.

On FSCommand (Pro edition only)

The actions that will be performed whenever an fscommand() function is performed in the Flash file's internal actionscript code.

Note: "fscommand()" is the name of a Flash actionscript function that allows a .swf file to send a message or "command" to the application that is playing it. Whenever a Flash file calls the fscommand() function, AutoPlay responds by performing the action that you assigned to the On FSCommand event.

Tip: The Flash fscommand() function passes a command in the form of a short text string. You can use AutoPlay's own scripting abilities to differentiate between fscommand() calls that pass different command strings. In fact, your Flash file can use the fscommand() function to send any number of custom commands to your AutoPlay application, and you can make your application respond to each command in any way you want.

The following event variables are automatically set whenever this event is triggered:

e_FSCommand

(string) A string containing the last FSCommand fired within the Flash object.

e_FSArgs

(string) A string containing the arguments of the last FSCommand fired within the Flash object.

On Key (Pro edition only)

Note: This event is available for the input object, listbox object and each page in your project.

On the input object, these are the actions that will be performed whenever the cursor is inside the input object and the user presses a key.

On the listbox object, these are the actions that will be performed whenever the listbox object has focus and the user presses a key.

On a page, these are the actions that will be performed whenever the application window has focus and the user presses a key.

The following event variables are automatically set whenever this event is triggered:

e_Key

(number) The virtual key code of the key that was pressed.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the key was pressed. A modifier key is a key that can be held down while another key is pressed, to "modify" it.

There are three true/false values in the table, one for each type of modifier key on the keyboard: shift, ctrl, and alt. You can access these values as e_Modifiers.shift, e_Modifiers.ctrl, and e_Modifiers.alt.

On Leave

The actions that will be performed when the mouse moves off of this object ("leaves" the object's territory).

On Loaded (Pro edition only)

The actions that will be performed whenever the URL being navigated to has finished loading.

The following event variables are automatically set whenever this event is triggered:

e_URL

(string) A string containing the URL that has finished loading.

On Navigate (Pro edition only)

The actions that will be performed whenever the URL changes (when it starts to navigate to a new page) in the web object.

The following event variables are automatically set whenever this event is triggered:

e_URL

(string) A string containing the URL that is being navigated to.

On Pause

The actions that will be performed whenever the video is paused in a video object.

On Play

The actions that will be performed whenever the video starts to play in a video object.

On Preload

The actions that will be performed right after the page is created in memory, before the page (or any of the objects on it) is shown.

You can use this event to set the initial visibility of each object on the page. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the page is displayed, you can avoid any visible "flickering" as the objects are hidden or shown.)

Note: Some actions (especially object-related actions) may not work properly on this event because it occurs before any of the page's objects are "created." If an action doesn't work at On Preload, try it at On Show instead.

On Show

The actions that will be performed whenever the page is opened (after the page is shown and the objects have been drawn).

On Select (Pro edition only)

The actions that will be performed when the user selects or deselects items in the listbox.

On Shutdown

The actions that will be performed whenever your AutoPlay application closes. The AutoPlay application can either be closed using the Application.Exit action or if the user clicked close button ( ) on the application title bar.

On Startup

The actions that will be performed right after the user launches your AutoPlay application, before any pages are initialized and shown.

Note: that some actions (especially object-related actions) may not work properly on this event because it occurs before any objects in the project are "created."

On Stop

The actions that will be performed whenever the video is stopped in a video object.

On Timer (Pro edition only)

The actions that will be performed whenever the page timer fires. You can start the page timer using a Page.StartTimer action.