Editing Actions and Events


You can edit the actions and events that combine to make behaviors in several ways: You can change the event to which an action corresponds, you can attach several actions to a single event, and you can change the order in which those actions occur. For example, in the previous exercise, Swap Image was the action, and OnMouseOver was the event that corresponded to the rollover behavior. In this exercise, you will add an action for a pop-up message and select a corresponding event.

1.

In the meditations.html document, draw a rectangular image map hotspot around the word "poses" on the med_img_map.jpg image. With the hotspot selected, click the plus sign (+) button in the Behaviors panel and choose Popup Message from the Actions menu.

The Popup Message dialog box opens, displaying a text field in which you can type your message.

2.

Type Explore a variety of different yoga poses and click OK.

The Popup Message action and the corresponding event, onClick, appear in the Behaviors panel.

3.

Click the onClick event in the Behaviors panel. From the menu that appears on the right of the current event, select the onMouseOut event.

Note

You can choose what browser type to display events for by making a choice from the Show Events For portion of the Add Behavior menu. You can choose to show events for a specific browser version, such as IE 6.0, or for all browsers of a specified version number, such as 4.0 and later browsers. After you select a browser type, you can select an event in the Behaviors panel to make the Events menu available. The Events menu then lists only those events that are available for the browser type that you chose.

The events that are available in this menu might differ depending on the action and the browser type you choose. The Events menu appears only when you select an event in the Behaviors panel.

The up and down arrow buttons on the Behaviors panel can be used to adjust the order in which events appear in the Behaviors panel list. The up arrow moves the selected item up in the list; the down arrow moves it down in the list. Use these buttons to change the order in which actions are executed by the browser.

4.

Save and preview the page in the browser.

Use care when adding the Popup Message behavior to your pages. Similar to pop-up windows, which you will learn to create later in this lesson, pop-up messages can quickly annoy your visitors when overused.

Leave this file open to use in the next exercise.




Macromedia Dreamweaver 8(c) Training from the Source
Macromedia Dreamweaver 8: Training from the Source
ISBN: 0321336267
EAN: 2147483647
Year: 2006
Pages: 326

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net