Actions  -

The “Custom” Action is a very useful tool when working with DHTML Actions in NetObjects Fusion - it allows you to send a message to multiple items at once, triggering multiple Actions with a single command.
plainbutton
smalllogo

If you click on the button marked “Click Me”, three little “Workbench” Logos and a divider line will all simultaenously appear on the page at once.

Click on any of these items to hide then again.

divider
smalllogo
smalllogo
The functionality you see in the Sample above is all accomplished through the use of Custom messages.

Here´s how:

  1. Place all the “Click Me” image, one of the small logos and the “divider line” image in the Layout Area
  2. Create an Action for the “Click Me” image according to the following recipe:

    When -> Mouse -> Clicked
    Target -> (samplelayout)
    (this is the name of the layout area with the “sample” background)
    Message -> Custom -> Edit -> ShowMe
    (this creates a custom message called “ShowMe”)

    ... and click on the “Cascade Message” checkbox.
    This last part tells NOF that when the “Click Me” button is clicked, it is to send the “ShowMe” message to the Layout Area called “samplelayout” and all the elements in that Layout Area.  This is particularly important, as you´ll see below...
  3. For the “small logo” image, uncheck the “Object Initially Visible in Browser” checkbox, then create the following Actions:

    When -> Custom -> ShowMe
    Target -> (the image itself)
    Message -> Object -> Show

    ... this Action tells the logo image to show itself when it receives the “ShowMe”  Custom Message.
    • Since we´d also like the image to hide itself when it´s clicked, we´ll create these two additional Actions:

      When -> Mouse -> Clicked
      Target -> (samplelayout)
      Message -> Custom -> Edit -> HideMe
      (this creates a custom message called “HideMe”)

      ... and click on the “Cascade Message” checkbox.
      This Action will send a “HideMe” message to the “samplelayout” Layout Area and, again, all the elements inside that Layout Area.
    • Now we need to create an Action to tell the image to hide itself when it receives the “HideMe” message :

      When -> Custom -> HideMe
      Target -> (the image itself)
      Message -> Object -> Hide

  4. Create Actions for the “divider line” image which are the same as the Actions in Step 3.
  5. (This is really cool) Duplicate the “small logo” image (and all its Actions) by dragging the image to another location in the Layout Area while holding down the Control Key (this is the Command Key in the Mac Version)

... The Custom Message feature can be very powerful when used in conjunction with the Delay Action ...

Note:  All Actions described in this section have been tested with Fusion 3.x, 4.x, 5.x and MX.
           Actions will not currently work properly when viewed with Netscape 6.0

Go Back to Previous Page

Have a question that you can´t find the answer to? Want to report a possible bug?

Send a help request to NetObjects Technical Support