Page

Here are the page's settings as they appear on the "double-click" Properties dialog.

There are two tabs on the Properties dialog:

Settings

Script

Settings Tab

Page

Name:

The unique name that is used to identify this page.

Description:

A short description you want to use for this page. If entered, this text will be shown to identify this page in the Dialog.PageSearch action. You an also access this value at runtime using the Application.GetPageProperties action.

Keywords:

A comma-delimited list of keywords you want to store for this page. These can be used to allow the user to search your application at runtime for pages containing keyword text. See the Dialog.PageSearch action for displaying a search dialog in your application, and the Application.MakeKeywordIndex and Application.SearchKeywords actions for manually working with the keyword index in your project.

Background

Use custom settings

Checking this checkbox will allow you to change the look of your page background. If this checkbox is unchecked, the page background will be the default background color for windows applications.

Note: If you skin your application, the default background color will come from your skin file.

Solid color

Cover the background with a single, solid color. You can click the select button to bring up a color chooser.

Tip: Clicking the "More Colors..." button on the color menu allows you to choose either a standard color/custom color, or use the eyedropper to pick a color from somewhere within the AutoPlay application window.

Gradient

Cover the background with a 2-color gradient. You can click on both of the select buttons to bring up color choosers.
(A smooth transition from one color at the top of the page, to a second color at the bottom of the page.)

Image

Display an image as the background. The image will be resized to fit the page.

File:

The image that will be used as the background for this page. Click the browse button to select an image file.

Note: This setting is only available when the "Image" background is selected.

Fit to page

Resize or stretch the image to cover the entire page. (This may cause some images to appear distorted.)

Tile

Cover the background with copies of the image placed side-by-side and top-to-bottom, like tiles on a floor.

Actual size

Display the image using it's original dimensions. The image will be positioned in the top left hand corner of the page.

Background color:

The color to use behind the image if the image does not cover the entire page. Click the select button to bring up a color chooser.

Inherit

Background from page:

The name of the page whose background properties you want to inherit. The background for that page will be used on the current page. If you need to edit the background, you will need to go to the page you inherited from to make any changes.

Objects from page:

The name of the page whose objects you want to inherit. If you need to edit any objects that are inherited, you will need to go to the page you inherited from to make any changes.

Transition

Effect:

The type of transition you want to have between pages in your project. Click the select button to choose one of the available transition effects.

Settings...

Opens the transition properties dialog where you can choose the settings you want to have for the selected transition effect.

Script Tab

You can use the script editor on this tab to edit the script of actions that will be performed on each of this page's events.

Each page supports the following events:

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 Close

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

On Timer

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

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

e_ID

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

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.

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 Size

The actions that will be performed whenever the page changes size. For example, if the user maximizes the application's window, this event 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_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).

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 Key

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 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 behaviour:

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.

e_Y

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

On Mouse Move

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

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

e_X

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

e_Y

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

On Mouse Wheel

The actions that will be performed when the mouse wheel is rotated while the page 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.

e_Y

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