Show-Hide Layers

Team-Fly    

Macromedia® DreamWeaver® MX Unleashed
By Matthew Pizzi, Zak Ruvalcaba
Table of Contents
Chapter 19.  Behaviors


A great advantage of layers is that they're part of DHTML. With that, they have the capability to be hidden or visible. With JavaScript, or in Dreamweaver's case behaviors, you can dynamically turn the visibility of a layer on or off.

To apply the Show-Hide layer behavior, follow these steps:

  1. Select the object in your document that you want to trigger the behavior.

  2. Make sure all the layers in your document are named. You can name each layer in the Properties Inspector.

  3. In the Behaviors panel, click the Add Behavior (+) button. In the drop-down menu, choose Show-Hide Layers. This opens the Show-Hide Layers dialog box, as shown in Figure 19.22.

    Figure 19.22. The Show-Hide layer dialog box offers the option of turning the visibility of the specified layers on or off.

    graphics/19fig22.jpg

  4. To reveal a hidden layer, highlight the name of the layer you want to show and click the Show button.

  5. To hide a visible layer, highlight the name of the layer you want to hide and click the Hide button.

  6. To set a layer's default visibility value, click the Default button.

  7. When you're happy with the setting, click OK to return to the document.

Using Show-Hide layers can add a great deal of functionality and interactivity to your pages.

NOTE

Refer to the companion Web site located at http://www.dreamweavermxunleashed.com to see some QuickTime movies further illustrating the power of the Show-Hide layers behavior.



    Team-Fly    
    Top


    Macromedia Dreamweaver MX Unleashed
    Macromedia Dreamweaver MX 2004 Unleashed
    ISBN: 0672326310
    EAN: 2147483647
    Year: 2002
    Pages: 321

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