Script Editor

Each event represents something that can happen at run time. When an event is triggered, any script that was 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 Cell Changed

On Check

On Char

On Click

On Close

On Double-Click

On EditLabel

On Enter

On Error

On Expanded

On Finish

On Finished

On FlashCall

On Focus

On FSCommand

On Hyperlink

On Key

On Leave

On Link

On Loaded

On Menu

On Mouse Button

On Mouse Button Down

On Mouse Button Up

On Mouse Move

On Mouse Wheel

On Movie End

On Navigate

On Pause

On Play

On Preload

On Rate Change

On Right-Click

On Show

On Size

On Select

On Selection Changed

On Shutdown

On Slide Changed

On Startup

On Stop

On Timer

 


 

On Audio

The actions that will be performed whenever an audio channel's state changes on the page or dialog. 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.

CHANNEL_USER2

2

User channel 2.

CHANNEL_USER3

3

User channel 3.

CHANNEL_USER4

4

User channel 4.

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 Cell Changed

The actions that will be performed whenever the text of a cell changes for any reason in a grid object. This may result from the user editing cell text or from text being pasted in or even from the text changing in response to an action such as Grid.SetCellText.

e_Row

(number) The row (0-based) of the cell that changed.

e_Column

(number) The column (0-based) of the cell that changed.

e_OldText

(number) The text that was in the cell before it was changed.

e_NewText

(number) The new text of the cell.

On Char

The actions that will be performed whenever the cursor is inside an input object and receives the WM_CHAR windows message. This event will occur after the input object's On Key event is fired, but will not necessarily be fired after each key stroke. This event is similar to the On Key event, except instead of being fired each time a key is pressed, On Char is fired when a keystroke (or a combination of keystrokes) translates to a character.

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

e_Char

(number) The character 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 Check

The actions that will be performed whenever an item is checked/unchecked in a tree or listbox object.

ListBox - Note that clicking on an unselected checkbox in the list will trigger an On Select event before the On Check event is fired. This is the normal behaviour for checklist box controls in Windows. Specifically, clicking on a checkbox in the list toggles the check for all selected items. If the item is currently unselected, it is selected first, then the checkbox is toggled.

ListBox - Note: If the item is already selected, there will be no On Select event first. Do not depend on there being an On Select every time you toggle a check box.

The following event variables are automatically set whenever this event is triggered: (only available for the tree object).

e_NodeIndex

(string) The index of the node being checked/unchecked.

e_Checked

(boolean) True if the node has been checked, false if it has been unchecked.

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 or dialog is closed.

Tip: If you need to prevent the user from closing the dialog or want to add a confirmation message, you can use the built-in function QueryAllowDialogClose.

On Double-Click

The actions that will be performed when the user double-clicks within the bounds of this object.

On EditLabel

The actions that will be performed whenever an item's label is changed in the tree object.

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

e_NodeIndex

(string) The index of the node being edited.

e_NewText

(string) The text that has just been set.

e_OldText

(string) The text that existed previously before the user edited the current node.

On Enter

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

On Error

The actions that will be performed when an error occurs in a QuickTime object.

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

e_ErrorCode

(number) The numeric code of the error that has occurred.

e_ErrorOrigin

(number) Where the error originated from:

CONSTANT

VALUE

DESCRIPTION

qtErrorEventOriginControl

0

An error occurred in the QTControl area of the QuickTime ActiveX control.

qtErrorEventOriginMovie

1

An error occurred in the QTMovie area of the QuickTime ActiveX control.

qtErrorEventOriginQuickTime

2

An error occurred in the QTQuickTime area of the QuickTime ActiveX control.

On Expanded

The actions that will be performed whenever an item is expanded/collapsed in the tree object.

e_NodeIndex

(string) The index of the node being expanded/collapsed.

e_Expanded

(boolean) True if the node has been expanded, false if it has been collapsed.

On Finish

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

On Finished

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

Note: If the Loop setting is selected, this event will not be fired.

On FlashCall

The actions that will be performed whenever an exposed Flash actionscript function is called using the control's external API (ExternalInterface class) causing it to dispatch its FlashCall event. You can respond to Flash actionscript function calls using the Flash.SetReturnValue action, or call Flash actionscript functions using the Flash.CallFunction action.

Flash's external API offers additional functionality compared to fscommand() by allowing any number of arguments to be passed as well as various data types.

Note: This event is only available in Flash version 8.0 or later.

e_FlashCall

(string) An XML formatted string containing the function request from the Flash file's actionscript code. This string can be parsed using the available XML actions.

On Focus

Note: This event is available for input objects, listbox objects, combobox objects, richtext objects, and tree 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

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 Hyperlink

The actions that will be performed when the user clicks on a hyperlink in a markup enabled xButton object.

The following event variable is automatically set whenever this event is triggered:

e_Hyperlink

(string) A string containing the hyperlink text that the user clicked on an xButton object. This is the text surrounded by Hyperlink tags in its markup text. For example, "Link Text" would be returned if the markup text contained <Hyperlink>Link Text</Hyperlink>.

On Key

Note: This event is available for the input object, listbox object, combobox object, tree object, richtext object and each page or dialog 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 the combobox object, these are the actions that will be performed whenever the combobox object has focus and the user presses a key.

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

On the richtext object, these are the actions that will be performed whenever the richtext 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.

On a dialog, these are the actions that will be performed whenever the dialog 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 Link

Note: This event is available for richtext objects in your project.

The actions that will be performed when the user clicks on a link in a richtext object.

Note: To use this event, you must have the Auto-detect URL feature enabled.

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

e_Min

(number) The 1-based character index where the link's text begins.

e_Max

(number) The 1-based character index where the link's text ends.

e_Link

(string) The text of the link that was clicked.

On Loaded

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 Menu

The actions that will be performed when the user interacts with the menu bar.

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

e_ID

(number) The item ID of the menu item currently being interacted with.

e_ItemInfo

(table) Extended information about the currently selected menu item.

KEY

TYPE

DESCRIPTION

Text

string

The text of the menu item currently being interacted with.

ID

number

The item ID of the menu item currently being interacted with.

IconID

number

The 0-based icon index from the Image List specified on the Menu Bar for the menu item.

Enabled

boolean

True if the current menu item is enabled, false if it is not.

Checked

boolean

True if the current menu item is checked, false if it is not.

On Mouse Button

The actions that will be performed when a mouse button is clicked within the bounds of your application.

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

e_Type

(number) A number containing the type of mouse-button click that occurred:

CONSTANT

VALUE

DESCRIPTION

LEFT_BUTTON_DOWN

0

Left mouse button has been pressed.

LEFT_BUTTON_UP

1

Left mouse button has been released.

RIGHT_BUTTON_DOWN

2

Right mouse button has been pressed.

RIGHT_BUTTON_UP

3

Right mouse button has been released.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page or dialog.

On Mouse Button Down

The actions that will be performed when the cursor is over a QuickTime object and a mouse button is pressed down.

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

e_Button

(number) The index of the button that was pressed:

CONSTANT

VALUE

DESCRIPTION

BUTTON_LEFT

1

Left mouse button.

BUTTON_RIGHT

2

Right mouse button.

BUTTON_MIDDLE

3

Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button 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.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Mouse Button Up

The actions that will be performed when the cursor is over a QuickTime object and a mouse button is released.

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

e_Button

(number) The index of the button that was pressed:

CONSTANT

VALUE

DESCRIPTION

BUTTON_LEFT

1

Left mouse button.

BUTTON_RIGHT

2

Right mouse button.

BUTTON_MIDDLE

3

Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button 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.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_X

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

e_Y

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the page.

On Mouse Move

The actions that will be performed when the mouse moves within the bounds of your application or a QuickTime object.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the right side of the page or dialog.

The following additional event variables are automatically set whenever this event is triggered for a QuickTime object:

e_Button

(number) The index of the button that was pressed:

CONSTANT

VALUE

DESCRIPTION

BUTTON_LEFT

1

Left mouse button.

BUTTON_RIGHT

2

Right mouse button.

BUTTON_MIDDLE

3

Middle mouse button.

e_Modifiers

(table) A table containing three boolean values that describe which modifier keys were held down while the mouse button was pressed. A modifier key is a key that can be held down while button 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.

e_XObject

(number) The horizontal position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

e_YObject

(number) The vertical position of the mouse cursor when the mouse button was pressed, relative to the top left of the object.

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while a page or dialog has focus.

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

e_Flags

(table) A table containing five boolean values that describe which modifier keys or buttons were held down when the mouse wheel event was fired.

There are five true/false values in the table: shift key, ctrl key, left mouse button, middle mouse button, and right mouse button. You can access these values as e_Flags.shift, e_Flags.ctrl, e_Flags.LButton, e_Flags.MButton, and e_Flags.RButton.

e_Delta

(number) The distance that the mouse wheel was rotated. A negative value indicates that the mouse wheel was rotated backward towards the user, and a positive value indicates that the mouse wheel was rotated forward away from the user. This can be altered by the user via their mouse software. This value will usually be 120 or -120, however may be multiples or divisions of 120 depending upon the mouse vendor.

e_X

(number) The horizontal position of the mouse cursor, in pixels, from the left side of the page or dialog.

e_Y

(number) The vertical position of the mouse cursor, in pixels, from the top of the page or dialog.

On Movie End

The actions that will be performed when the media file has finished playing in a QuickTime object.

On Navigate

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, or slideshow is paused in a slideshow object.

On Play

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

On Preload

The actions that will be performed right after the page or dialog is created in memory, before the page or dialog (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 or dialog. Simply show or hide the objects according to whether they should start out visible or hidden. (By doing so before the page or dialog 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 Rate Change

The actions that will be performed when the play rate of the media file within a QuickTime object has changed.

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

e_Rate

(number) The new rate of the media file.

On Right-Click

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

On Select

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

The following event variables are automatically set whenever this event is triggered through a combobox object:

e_Selection:

(number) The index of the comboxbox item that is being selected. (The first item in the list has an index of 1.)

On Selection Changed

Note: This event is available for richtext and grid objects in your project.

The actions that will be performed when the selection changes in a richtext object.

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

e_Min

(number) The 1-based character index of the start of the selection.

e_Max

(number) The 1-based character index of the end of the selection.

The actions that will be performed whenever the selection of cells in a grid object changes.

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

e_Row

(number) The row (0-based) of the cell that now has focus.

e_Column

(number) The column (0-based) of the cell that now has focus.

On Show

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

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.

Tip: If you need to prevent the user from closing the application or want to add a confirmation message, you can use the built-in function QueryAllowProjectClose().

On Slide Changed

The actions that will be performed each time the slide changes in the slideshow object.

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

e_Index

(number) The 1-based index of the slide that was changed to in the slideshow (currently shown).

e_FilePath

(string) The full path to the image file that was changed to in the slideshow (currently shown).

On Size

The actions that will be performed whenever the page or dialog changes size. For example, if the user maximizes the application's window, these actions will fire.

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

e_WindowWidth

(number) The width, in pixels, of the entire application window, including the border and title bar.

e_WindowHeight

(number) The height, in pixels, of the entire application window, including the border and title bar.

e_PageWidth

(number) The width of the current page.

e_PageHeight

(number) The height of the current page.

e_DialogWidth

(number) The width of the current dialog.

e_DialogHeight

(number) The height of the current dialog.

e_Type

(number) The type of resize that has occurred. Choose from:

CONSTANT

VALUE

DESCRIPTION

SIZE_RESTORED

0

The application was either restored from being maximized or minimized or was resized normally.

SIZE_MINIMIZED

1

The application was minimized to the taskbar.

SIZE_MAXIMIZED

2

The application was maximized.

 

Tip: To make your project resizable, enable the resizable option on the Appearance tab of the Project Settings dialog (Project > Settings). Dialogs have their own resizable setting located on the Attributes tab of its properties dialog.

On Startup

The actions that will be performed right after the user launches your AutoPlay application, before any pages or dialogs 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

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

The following event variable is automatically set whenever this event is triggered:

e_ID

(number) The numeric ID of the page or dialog timer that has fired. This is the same ID that was passed to the Page.StartTimer or DialogEx.StartTimer action that created the timer. When using multiple timers, you can differentiate between them using if/elseif statements.

Сайт управляется системой uCoz