Accessibility

TechNote (Archived)

Fireworks Pop-up Menus in Dreamweaver Library files

Issue


After exporting a file containing Pop-up Menus as a Dreamweaver Library Item (LBI), the Pop-up Menus will not work in a file containing the library item.

Reason


The Fireworks 4 Pop-up Menus feature writes an internal JavaScript function as well as an external JavaScript file which are both called by mouse events in the HTML. This function and the external JavaScript are not recognized as Dreamweaver functions and therefore are not included in the file on export. If you view the LBI file's source code, any JavaScript calls to the fwLoadMenus function or the external JavaScript file fw_menu.js will be absent from the code. Dreamweaver Library files work on the principal that any calls to JavaScript functions must be native to the Dreamweaver application for them to be recognized when the Library file is inserted into Dreamweaver. When Dreamweaver sees a call to a recognized function in the LBI file, it automatically inserts it into the head tag where all JavaScript functions reside in a Dreamweaver HTML file.

Solutions
There are two possible solutions. One is to export from Fireworks asHTML and Images. The other is tocreate a Dreamweaver library item from the Fireworks HTML file.

Export from Fireworks as HTML and Images

Export the Fireworks document:

1

In Fireworks, choose File > Export.

2

In the Export dialog box, browse to the Dreamweaver Site folder defined as the local root folder. Choose HTML and Images from the Save as type menu and select the Put Image in Subfolder option. Click Save.

3

Launch Dreamweaver and open a new or existing file to contain this content. Save this file to the root level of the site directory.

4

Choose Insert > Interactive Images > Fireworks HTML.

5

Browse to the folder containing the HTML file exported from Fireworks. Select the file, then choose Open.

6

Click OK in the Insert Fireworks HTML dialog.

Use Dreamweaver to launch and edit the Fireworks files:

1

Within an HTML file containing the Fireworks images, select the table containing those elements. Dreamweaver's Property inspector should display Fireworks Table in the top left corner.

2

With the Fireworks table selected, click the Edit button in the lower right corner of the Property inspector. This will launch the PNG file in Fireworks.

3

Make the edits required to the images or to the pop-up menus in Fireworks, then click Done. Those changes will now appear in the open HTML file.

4

In every HTML file containing these images, follow steps 1 and 2. Since the saved PNG file already contains the edits, choose the Done button immediately within the Fireworks file.

Note: It is recommended that Fireworks PNG files be saved in a folder at the root level of the site directory so they may be easily accessed by Dreamweaver.

Create a Dreamweaver library item from the Fireworks HTML file
The following process can be used to gain Dreamweaver Library functionality. It involves changing the code, so it should be used only by experienced developers. This procedure may not work in all circumstances, so users are advised to test thoroughly.

Creating the original file:

1

From Fireworks, choose File > Export.

Note: Testing with these steps has shown that if a fw_menu.js file from another Fireworks export operation exists in the Dreamweaver site root directory, then that file needs to be deleted before exporting from the new Fireworks file containing a Pop-up Menu. Renaming an existing fw_menu.js and then fixing the name in the call to the .js file in existing HTML files is possible workaround for this. Best results are achieved by exporting to an empty site folder.

2

In the Export dialog box, browse to the Dreamweaver site folder defined as the local root folder. Choose HTML and Images from the Save As menu and select the Put Images in Subfolder option (see illustration above). Do not export as Dreamweaver Library (.lbi).

3

In Dreamweaver, create a folder named Library at the root level of the site folder, if one is not already present.

4

Create a new file and save it to the Library folder with an .lbi extension.

5

With this new library file open, launch the Code Inspector (Window > Code Inspector). Highlight all of the code in the Code Inspector and delete it. Close the Code Inspector. (You can also do this in Code View).

6

Once in the document window's Design view, choose Insert > Interactive Images > Fireworks HTML. Browse to locate the file that was exported from Fireworks into the site root folder, then click Open. Click OK in the Insert Fireworks HTML dialog.

7

Save the LBI file. Now you will be able to use the Library file in an HTML file that is saved to the Site Root.

8

Open a file that is in the Site Root folder or create a new HTML document and save it to the Site Root folder.

9

Choose Window > Library to view the Library panel and find the new Library item in the list. Click on it to see the preview at the top of the panel.

10

Drag the preview of the Library object onto the page and release it in the desired location.

Note: Pop-up Menu locations are absolute to the top left corner of the page. Inserting a Library object into any other location will result in the Pop-up Menus being displayed improperly. You can edit the location of the Pop-up menus in the HTML file before inserting it into the Library file (step 6 above). for more information on adjusting the location of Pop_up Menus in Fireworks, see Changing the location of a Pop-up Menu exported from Fireworks (TechNote #15001).

11

Save the Dreamweaver HTML file.

Using Dreamweaver to launch and edit the Fireworks files:

1

Open the HTML file created from Fireworks in step 2.

2

Select the table containing the Fireworks images. Dreamweaver's Property inspector should display Fireworks Table in the top left corner.

3

With the Fireworks table selected, choose the Edit button in the lower right corner of the Property inspector. This will launch the PNG file in Fireworks.

4

Make the edits required to the images or to the pop-up menus in Fireworks, then click Done. Those changes will now be apparent in the open HTML file.

5

Open the existing library item in Dreamweaver.

6

Within the library file, launch the Code Inspector by choosing Window > Code Inspector. Highlight all of the code in the Code Inspector and delete it. Close the Code Inspector.

7

Once in the document window, choose Insert > Interactive Images > Fireworks HTML. Browse to locate the file exported from Fireworks into the site root folder, then choose OK.

8

Apply the changes in the library item to the HTML pages by choosing Modify > Library > Update Pages.

Additional information
For additional information about Pop-up Menus in Fireworks or Dreamweaver, consult the following:

Customizing and troubleshooting Pop-up Menu images (TechNote 14995)

Changing the location of a Pop-up Menu exported from Fireworks (TechNote 15001)

How to set the length of time a Pop-up Menu remains visible (TechNote 15007)
Fireworks 4 Pop-up Menus in Dreamweaver 4 templates (TechNote 15088)
Fireworks Pop-up Menus in Dreamweaver Library files (TechNote 15101)

Note:aspects of the Pop-up Menu feature in Fireworks were improved in the Fireworks 4.0.2 Updater. See Fireworks 4 and 4.0.2 release notes for specific information about the updater



AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:tn_15101

Products Affected: