18.02.2015 Views

5ml User's Guide

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>5ml</strong> <strong>User's</strong> <strong>Guide</strong><br />

Changing Behavior Properties<br />

The Behavior tab on the Properties pane lets you associate an element (or page) with an event and an action to perform<br />

when that event is triggered, for example, when the user taps or clicks the element, such as navigating to another page<br />

or executing a custom script. For details about supported events and actions, see "About Events" on page 224 and "About<br />

Actions" on page 226. The events and actions that appear in the drop-down lists depend on the widget type and whether<br />

the SDK is enabled for the project.<br />

Note: To use a Custom Function action, you must enter the function into the Script Editor before selecting the Event and<br />

Action. (Some custom functions might require you to enable the SDK functionality. For more information, see "Enabling<br />

Native Device Functionality" on page 372.)<br />

To change an element's Behavior properties:<br />

1. Open a project page, and on the Page Outline, select the page or a page element.<br />

The Properties pane for the page or element appears on the right side of the Project Editor, and the Behavior tab is<br />

at the top right of the Properties pane, as shown in Figure 8-1 on page 223.<br />

2. On the Properties pane select the Behavior tab.<br />

Figure 8-1: Associating a Button element with an event and action on the Behavior tab<br />

3. Click the add behavior ( ) button.<br />

4. From the Event drop-down menu, choose an event. For example, choose onclick.<br />

5. From the Action drop-down menu, choose an action. For example, choose Show Page, and then choose the page<br />

to open. In this example you can also choose how to transition the page change. For example, for Effect choose<br />

Fade in, for Acceleration choose Ease, and for Duration enter 2.<br />

6. Click Apply. The new behavior displays in the Behavior list.<br />

- 223 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!