Adding Actions to Objects and Pages

You can add an action to any object, Layout, or MasterBorder. NetObjects Fusion comes with several actions you can apply by choosing options from menus. Just specify a trigger event to start the action, the action itself, and the object you want it to target.

You can add any number of actions to an object. For example, one action might cause a button to highlight when you mouse over it, while another action removes the highlighting when you move the mouse away.

Note:
Because MasterBorders can apply to several pages, any object in the Layout that’s targeted by an action involving a MasterBorder must be available in all Layouts using that MasterBorder.

  1. In Page view, select the item you want to trigger the action, and click the Actions tab on the Properties palette.

Clear the Object initially visible in browser option to hide the object when the page loads. For example, if an action targeting this object makes it fly onto the page, you will want to hide the object until the fly action is triggered.


 

  1. Click the Add Action  button on the Properties palette to add a new action.

The Set Action dialog appears.

  1. Specify the action’s trigger event in the When field.

Click the When menu button next to the field, point to a trigger category, and click the trigger event you want.

The trigger events available depend on the object you’re adding the action to. These can include:

  1. Make sure Standard Action is displayed in the action type drop-down list. For information about scripted actions, see Scripting Your Own Actions.

  2. Specify the object your action is to target in the Target field.

 

The action can target any object on the page, the Layout itself, or even the MasterBorder. By default, it targets the object triggering it. To target another object, click the Target menu button next to the Target field and choose an object from the Object Tree palette. If you add a “Fly Out to Top Right” action to one picture and target it at another, for example, clicking the first picture can trigger the target picture to fly off the page.

You can also cascade an action to several objects at once; see Targeting Several Objects with One Action.

  1. Specify the action you want to occur in the Message field.

Click the Message menu button next to the Message field, point to a category, and click the action you want.

Your choices for actions depend on the object you’re targeting. These can include:

  1. If the action you specify requires parameters or can be tailored with additional parameters, specify a value or expression in the Parameters field.

    Click the Parameter menu button next to the Parameters field and click an available option. For example, for a Fly message you can choose a direction parameter like In from Top.

For some actions, you can click Values on the Parameters menu to choose from a wider selection of values.

The Parameter Values dialog appears, listing all parameters currently available for this action and their default values.

To modify a value, select a parameter and edit its value in the field at the top of the dialog. Depending on the parameter, you might type the value, or choose it from a drop-down list, or from the Color Picker, Picture File Open dialog, or Link dialog. Click OK when you’re done editing parameters.

You can also write your own JavaScript expression to generate a parameter value. See Scripting Parameter Values.

  1. Click OK in the Set Action dialog.