Graphics Reference
In-Depth Information
case VERTICAL:
itemToPlace.y = lastItem.y +
lastItem.height + _spacing;
break;
default:
trace( ' Please use a String value of
" horizontal " or " vertical " for the SimpleMenu layout
param. ' );
break;
}
}
private function alterState(e:MouseEvent):void {
_menuItem = Sprite(e.target);
_menuItemLabel =
TextField(_menuItem.getChildByName(
"
itemText
"
));
switch(e.type) {
case MouseEvent.MOUSE_UP:
case MouseEvent.MOUSE_OVER:
_stateBackgoundColor = overBackground;
_stateBackgroundAlpha =
backgroundOverAlpha;
_stateTextFormat = labelFormatOver;
break;
case MouseEvent.MOUSE_DOWN:
_stateBackgoundColor = downBackground;
_stateBackgroundAlpha =
backgroundDownAlpha;
_stateTextFormat = labelFormatDown;
break;
case MouseEvent.MOUSE_OUT:
_stateBackgoundColor = upBackground;
_stateBackgroundAlpha =
backgroundUpAlpha;
_stateTextFormat = labelFormatUp;
break;
}
_menuItemLabel.setTextFormat(_stateTextFormat);
drawItemBackground(_menuItem,
_stateBackgoundColor, _stateBackgroundAlpha,
_menuItem.width, _menuItem.height);
}
// END PRIVATE FUNCTIONS
// START GETTERS AND SETTERS
// ——— background colors
public function get upBackground():uint {
return _upBackground;
}
Search WWH ::




Custom Search