Web DevCenter
oreilly.comSafari Books Online.Conferences.
MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA

Sponsored Developer Resources

Web Columns
Adobe GoLive
Essential JavaScript

Web Topics
All Articles
Scripting Languages

Atom 1.0 Feed RSS 1.0 Feed RSS 2.0 Feed

Learning Lab

Dreamweaver Power Combinations
Pages: 1, 2

Related Reference

Dreamweaver in a NutshellDreamweaver in a Nutshell
By Heather Williamson & Bruce Epstein
Table of Contents
Sample Chapter
Full Description

Once in the Show-Hide Layers dialog box, choose a behavior for each layer in your document. For instance, if you wish Layer1 to be visible and all others to be hidden when this behavior's associated event fires, you can select Layer1 and set it to Show, while simultaneously setting all the remaining layers to Hide.

You can trigger this behavior with either an onClick or an onMouseOver event associated with your button. You will need to repeat this process for every menu object in your document, showing its associated layer and hiding all of the rest, as shown in the following script statement.


After you have added your Show-Hide Layers Behavior to each layer in question, be sure to set the visibility of each layer to Hide in the layer's Property inspector. This will hide the layers when the document loads. Once you have completed your document, you will end up with pop-up menu options as shown in Figure 4.

Figure 4.
Figure 4. The Dreamweaver in a Nutshell site showing an opened pop-up menu

Comment on this articleHeather has provided some helpful power-user tips in this article. Do you have related tips to augment these?
Post your comments

Using extensions within templates

At the Macromedia Dreamweaver Exchange Web site, you'll find over 500 extensions that have been written specifically for Dreamweaver or Fireworks. You must be a member of the Exchange to download the extensions, but the registration is free.

As a member of the Exchange, you can access extensions from a variety of categories, including Accessibility, App Servers, Browsers, DHTML/Layers, E-commerce, Fireworks, Flash Media, Learning, Navigation, Productivity, Rich Media, Scripting, Security, Style/Format, Tables, and Text. Each of these categories provides a selection of tools that improve the functioning of your site.

Most extensions are a combination of JavaScript and HTML code. To use extensions on your Web sites created with templates, you must add the extension to the template itself. This may mean that you have to create a series of templates for each page with specific extensions installed.

For instance, if you use the Scrollable Layer extension on some pages of your document but not on others, then you want to have a separate template with the Scrollable Layer installed, as shown in Figure 5.

Figure 5.
Figure 5. The Dreamweaver in a Nutshell site using the Scrollable Layer extension loaded into a subpages template used just for documents with too much information to display on a single screen

Creating multimedia animations using timelines

OK, admittedly, HTML/JavaScript isn't the best combination to use to create smoothly running multimedia applications, but if you don't have the budget to purchase Macromedia Flash, then Dreamweaver makes a great stand-in.

Dreamweaver's Timelines feature allows you to add a fourth dimension to your Web pages using the timed display of images, sounds, and movement. Using Timelines, you don't have to create complex, animated graphics; you can combine a series of smaller animations, with the timed interjection of the Play Sound behavior, to create effects similar to what is available using Flash.

Timeline keyframes can be used to modify the width, height, top, left, z-index, and visibility attributes of layers, but only the src attribute of images. To change an image in other ways, such as to animate its position, place the image within a layer and then alter the layer attributes.

To start creating a multimedia animation, simply drag and drop your image/layer into the Timelines panel (Window --> Timelines). Keyframes, represented in your Timelines by white circles in the animation bar representing your image or your layer, provide the locations at which your layer or image properties can be manipulated. Don't adjust a property for your animation without first selecting the keyframe. Otherwise, you are adjusting the property for the entire object, not one particular point in the timeline.

Once you have added all of your keyframes and adjusted your layer properties, click on the frame in the Behavior (B) channel of the Timelines panel and choose the Play Sound behavior from the Behaviors panel's Add Behavior (+) pop-up menu. (Modify -->Timeline --> Add Behavior to Timeline opens the Behaviors panel for you). Timeline behaviors can be added in any frame of the timeline, whether it is a keyframe or a tween frame. Figure 6 shows you a completed timeline panel ready to test in your favorite Web browsers.

Figure 6
Figure 6. Timelines panel showing the ordered display and movement of a series of images with associated sound effects


These feature combinations provide you with a simulation of the effects you see on sites such as Microsoft, Macromedia, and Network Solutions. Although these are just a few of the combinations that can be created using the tools available with Dreamweaver and the Dreamweaver Exchange Web site, I hope they'll show you what can be done to spruce up your Web sites, while also reducing your development time.

More tips such as these are covered in Dreamweaver in a Nutshell. I hope that the tips discussed here have helped you see how combinations of Dreamweaver technology can work to save you time and energy. If you don't have Dreamweaver, try their free trial version, which is available at Macromedia.

Heather Williamson has authored several best-selling Web authoring books, and during the past five years, she's designed and developed corporate Intranet and Internet sites.

O'Reilly & Associates recently released Dreamweaver in a Nutshell: A Desktop Quick Reference.

Return to the Javascript and CSS DevCenter.