big bang Power tools for Adobe GoLive
MenuMachine Manual

 

 
FAQ

Why don't my Actions or Rollovers work?
How do I Flatten the Script Library?
What does flattening do?
Why do I need to do it?

The Script Library file contains the JavaScript code which makes GoLive Actions and GoLive Rollovers work.

You only need to use the Flatten Script Library command if you have used GoLive Actions or used GoLive Rollovers in your site.

The main advantage of flattening the Script Library file is to reduce its size so it will load faster in the viewer's browser.

Flattening the file before uploading it can also fix JavaScript problems in the browser if they are related to Actions you have used.

What is the Script Library file?

When you place a GoLive Action or Rollover on a page in your site, a JavaScript library file is automatically created and placed in your site. This "Script Library" file contains the JavaScript code required for Actions and Rollovers to work once your pages containing Actions or Rollovers are uploaded to a server. The JavaScript code in the Script Library file tells browsers what to do when an Action or Rollover is triggered.

This Script Library is a separate file that each page with an Action or Rollover will link to. Using this external file means that it only needs to be loaded once in the browser to be used by all pages in your site.

The JavaScript can alternatively be written into your pages but that will add a lot of code (therefore download time) to each page. Linking to the external file is more efficient.

What does "flattening" do?

This external JavaScript library file contains the code for all the GoLive JavaScript Actions even if you have only used one or two different Actions in your site.

Flattening the file removes any JavaScript code from the Script Library file contained in your site that is not needed for your site. This reduces the library's file size and decreases its download time. The reduction in size can be quite dramatic – e.g. reducing the file from around 80Kb down to 10kb.

What is the file called?

The file is called CSScriptLib.js and is placed in the GeneratedItems folder automatically by GoLive if you are using the default settings.

How does flattening affect MenuMachine?

Flattening the Script Library file has no direct effect on MenuMachine, menu functionality or the menumachine.js file which is the JavaScript Library for your menus.

However, if your page is having problems in the browser that are caused by a non-working Action or Rollover which loads before your menu, this can prevent your menu from working if the browser has "stalled".

It is a good idea to ensure your Script Library has been flattened and re-uploaded if you are experiencing any JavaScript problems in the browser.

You cannot flatten the menumachine.js file as all of the code contained in this file is required for your menus to work.

What do I do with the Script Library file?

Once your site is ready to upload, and the Script Library (CSScriptLib.js) has been flattened, you must upload the files to the web server.

By default, the files are contained in the GeneratedItems folder at the root level of your site. You simply upload the GeneratedItems folder to the same location it is in your site. The files should not be re-located or removed from the folder they are in when uploaded or the links to them will break.

The GeneratedItems folder and files in it should not be manually renamed (unless you have used the GoLive preferences to do so) or moved to another location in your site. They are default names and locations created by MenuMachine and GoLive and to change them may cause problems.

The GeneratedItems folder should be uploaded containing these files:

menumachine.js > Required for MenuMachine to function.
spacer.gif
 
menutriangle.gif > Required only if "Show arrows" option has been selected for submenus.
menutriangledown.gif
menutriangleleft.gif
 
CSScriptLib.js > This file is the JavaScript library file automatically created by GoLive if you have used GoLive Actions in your site.

Must be uploaded for Actions to work.

Not related to MenuMachine. This is the only file that is affected when you use the "Flatten Script Library" command.

Once you have uploaded the GeneratedItems folder and its contents to the web server, you will be able to view your menu pages from any computer accessing that server and Actions should work (in a JavaScript-enabled browser).

So how do I flatten the Script Library?

You can manually flatten the library file of a single site, set a site's Site Upload or Export preferences to automatically flatten the library file, or set the application preferences to flatten the library file of all sites before upload or during export.

1) To manually flatten the JavaScript library of a single site:
Open a site window and choose Site > Flatten Script Library.

NOTE: If you manually flatten te script library, you must remember to do this again if you later edit any pages which contain a GoLive Action as GoLive may un-flatten the file.

2) To set a site's preferences to flatten the JavaScript library upon upload or export:
1. In the Site Settings dialog box, select Upload/Export.
2. Select Site specific settings.
3. Select Flatten Script Library and click OK

3) To set all sites to flatten the JavaScript library upon upload or export:
1. Choose Edit > Preferences.
2. Expand Site and select Upload / Export.
3. Select Flatten Script Library and click OK.

Special Instuctions for Third Party or Additional Actions

If you have downloaded additional Actions from Adobe or third-party developers (e.g. the Lock MenuMachine Action from OUTactions), your CSScriptLib.js file may not automatically update to include the new JavaScript code.

You may need to follow these instructions if you notice that your new Actions do not work once uploaded.

To force GoLive to add the needed JavaScript for the additional Actions installed, you can use the Rebuild button in GoLive > Preferences > Script Library to actually update the code of freshly installed or removed Actions in the Script Library. This updates the master script library in GoLive folder so only needs to be done whenever you change the Actions installed in GoLive.

To ensure your Script Library is up-to-date:
1. Close GoLive
2. Install Actions
3. Start GoLive
4. Go to Preferences > Script Library > Rebuild (make sure "Import GoLive Script Library" button is selected)
5. Restart GoLive
6. Open site
7. Flatten Script Library
8. Re-upload the CSScriptLib.js file

This procedure should eliminate all possible problems.

For more information about the technical side of Actions and the use and the advantages of the Script Library:

GoLive JavaScript Actions White Paper

This Section

Troubleshooting & FAQs

<< back to Manual contents

Search documentation:
< Troubleshooting & FAQs

© Big Bang Software Pty Ltd 2004  

bb