You can also define the behavior for the entire page. Just follow the steps below:
|1.||Open the behavior editor view.|
|2.||Click the "Add Behavior" button in the toolbar and then select "For Pages..."|
|3.||Select the page(s). You can select multiple pages if you want to define behavior for them together.|
The step 1 and step 2 can also be achieved by pressing Ctrl+D (Command + D in Mac OS X).
In step 3, you will see the page chooser window:
The current page will be selected by default. So you can switch to target page first, and then press Ctrl+D (or do step 1 and 2), you can finish step 3 by directly click the "Select ? Page" button. Then you will see the behavior owner in the behavior editor:
After that you can define the event handler by adding event, flow control or/and action.
The "Add Event" button is enabled when you select the behavior (node with red flag icon). That means you can continue defining the behavior by adding events into it. All available events (according to owner type, you can find all available events in Events Reference) will be listed in a popup menu when you click the "Add Event" button.
.After adding the event, it will be selected by default and the "Add Flow Control" and "Add Action" buttons will be enabled now.
Add Flow Control or/and Action
Defining the behavior is just like creating flowchart. The event is the start point, and you can append flow controls (looping, branching, delay etc.) and actions under it.
If you click the "Add Flow Control" button, all available flow controls will be listed in a popup menu (more details can be found in Flow Control Reference):
If you click the "Add Action" button, all available flow controls will be listed in a popup menu (more details can be found in Action Reference):
Here is an example. If page 1, 2 or 4 is loaded, a message window will popup and tell you which page is loaded.