onClipEvent(enterFrame){
//this section determines which items the mouse is
currently over
    var current = null;
    var i=0;
    while (current == null && i < numItems){
        if
(this["item"+i].background.hitTest(_root._xmouse,
                         _root._ymouse, false)){
            current = this["item"+i];
        }
        ++i;
    }
//this section calculates the elasticity of the menu
items
    for (var i=0; i<numItems; ++i){
        this["item"+i].speed =
this["item"+i].speed*friction +
           (base -
this["item"+i].background._width)*speedRatio;
        if (current != null){
            if (this["item"+i] == current){
                this["item"+i].speed += boost;
            }else{
                this["item"+i].speed += invboost;
            }
        }
        this["item"+i].background._width += this["item"+i].speed;
        this["item"+i]._x = this["item"+(i-1)]._x +
                this["item"+(i-1)].background._width;
    }
}