GlideMenus

GlideParams

What Is GlideParams?

GlideParams is an object literal that defines the behavior of the tabs. You know what an object literal is, right?

What Does GlideParams Do?

GlideParams sets the behavior of the menus. For example, if you want to have the menus decelerate (slow down) when they open, animation, set ACCELERATION_BACK to a negative number.

  GlideParams = {

    START_SPEED : 400,// px per second
    HIDE_DELAY_MS : 300,
    SHOW_DELAY_MS : 200,// pause before showing submenu
    ACCELERATION_OUT :  .00055,// px/second/millisecond
    ACCELERATION_BACK : .0009,// px/second/millisecond
    FRAME_PAUSE : 1,
    CLICK_HIDE : true,
    CLICK_SHOW : true,
    IMG_OVER_EXT : "MO"
  };

GlideParams Reference Chart

START_SPEED
Speed of menu in px/sec.
HIDE_DELAY_MS
positive integer

How many milliseconds before a submenu hides after the user mouses the menu.

SHOW_DELAY_MS
positive integer

How long to pause before showing submenu

ACCELERATION_OUT
px/sec/ms

How fast to accelerate when opening menu. Use a negative number for deceleration.

ACCELERATION_BACK
px/sec/ms

How fast to accelerate in px/sec/ms

FRAME_PAUSE
px/sec/ms

How fast to accelerate in px/sec/ms

CLICK_HIDE
boolean

true - menu is hidden when the user clicks elsewhere on the page.

false - (nothing)

CLICK_SHOW
boolean

true - (nothing)

false - menu is shown when actuatorMouseover is called.

IMG_OVER_EXT
String A file name suffix before the extension.

if src="about.gif" is the normal file and you want it to be "aboutMO.gif" on mouseover, then IMG_OVER_EXT is "MO".

Swapping Header Images

Header images are swapped on mouseover. The image that swapped is set in the GlideParams. You must name your images with an extension for each state, e.g. "pic.gif" and "picMO.gif",.

You would then set the GlideParams for IMG_OVER_EXT like this:

GlideParams = {
    IMG_OVER_EXT : "MO",
    ... 
};

Next in this tutorial:

 

*AnimTree
*Tabs
*GlideMenus
*DragLib