05.03.2013 Views

User Guide - NetObjects Fusion

User Guide - NetObjects Fusion

User Guide - NetObjects Fusion

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples<br />

552<br />

8. Preview the page to test your rollover. Mouse over the button to see it<br />

highlighted, and click it to see it pushed in.<br />

Colliding One Object with Another<br />

This example demonstrates a drag action, collision detection, and custom<br />

messages, where dragging one object into another makes the second object fly off<br />

the page.<br />

1. In Page view, add two objects to the page.<br />

2. Make sure the first object (the one you plan to drag) is in front of the second<br />

object.<br />

3. Make a note of each object’s ID as it appears on the Action tab of the Properties<br />

panel.<br />

4. Select the first object and create a custom message named FlyAway, as<br />

described in “Tailoring Actions with Custom Messages” on page 542. Create an<br />

action to use in creating the custom message and then delete it.<br />

Your message becomes available in<br />

the When and Message menus<br />

5. Add an action to the first object (as described in “Adding Actions to Objects<br />

and Pages” on page 535) so that mousing down on it makes it stick to the<br />

pointer until you mouse up.<br />

In the Set Action dialog, enter Mouse, Mouse Down in the When field; the first<br />

object in the Target field; Drag, Start Drag in the Message field; and Until<br />

Mouse Up in the Parameters field.<br />

6. Add a collision detection action to the first object like this:<br />

In the Set Action dialog, enter Page, Page Loaded in the When field; the first<br />

object in the Target field; and Drag, Set Collision Detection in the Message<br />

field. Then open the Values dialog from the Parameters menu and specify the<br />

second object for the Object ID value (type the object’s ID exactly as it appears

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

Saved successfully!

Ooh no, something went wrong!