ActionScript Reference


Properties

borderColor
borderWidth
buffer
buttonSpace
buttonHeight
buttonSkin
buttonWidth
currentFont
currentFontColor
currentFontSize
currentFontStyle
clickedColor
clickedMark
disableCurrent
effect
effectSpeed
embeddedFonts
initialButton
menuAlignmentX
menuAlignmentY
menuDirection
overFont
overFontSize
overFontColor
overFontStyle
textVertical
textHorizontal
totalSize
useHandCursor
upFont
upFontSize
upFontColor
upFontStyle
xmlFilename
zoomPercent



Methods

init
loadMenuArrays
getCurrentMenuID
getCurrentMenuName
getCurrentOutID
getCurrentOutName
getCurrentOverID
getCurrentOverName
xmlLoaded

Events

onMenuPress
onMenuRelease
onMenuRollOut
onMenuRollOver

 

 

PROPERTIES

xmlFilename

Sets the path and name of the XML file

myMenu.xmlFilename = "menu.xml";
myMenu.init();


initialButton

Sets the initially selected menu button

myMenu.initialButton = 0;
myMenu.init();


menuDirection

Sets the direction of the menu

myMenu.menuDirection = "horizontal";
myMenu.init();

Options:

horizontal
vertical-right
vertical-left
vertical-center


menuAlignmentX

Sets the horizontal alignment of the menu

myMenu.menuAllignmentX = "center";

Options:

right
left
center

menuAlignmentY

Sets the vertical alignment of the menu

myMenu.menuAllignmentY = "center";

Options:

right
left
center


totalSize

Sets the total size of the menu

myMenu.totalSize = 450;
myMenu.init();


buttonSpace

Sets the spacing between menu buttons

myMenu.buttonSpace = 15;
myMenu.init();


buttonSkin

Sets the linkage name of the button skin to use with this instance of the menu

myMenu.buttonSkin = "transparentButton";
myMenu.init();


buttonWidth

Sets the fixed width of the menu buttons

myMenu.buttonWidth = 100;
myMenu.init();


buttonHeight

Set the fixed height of the menu buttons

myMenu.buttonHeight = 30;
myMenu.init();


buffer

Sets buffer spacing around left and right of menu text

myMenu.buffer = 10;
myMenu.init();


textVertical

Sets vertical alignment of menu text

myMenu.textVertical = "top";
myMenu.init();

Options:

top
middle
bottom

textHorizontal

Sets horizontal alignment of menu text when using vertical-left or vertical-right direction

myMenu.textHorizontal = "left";
myMenu.init();

Options:

left
right
center


effect

Sets the effect to use

myMenu.effect = "border";

Options:

none
fadeIn
border
zoom
zoom-ease
bounce-low
bounce-med
bounce-high
zoom-bounce-low
zoom-bounce-med
zoom-bounce-high
typewriter



effectSpeed

Sets the speed of the effect

myMenu.effectSpeed = 20;


borderColor

Sets the border color for the border effect

myMenu.borderColor = 0xFF0000;


borderWidth

Sets the width of the border lines for the border effect

myMenu.borderWidth = 3;


zoomPercent

Sets the zoom percentage for the zoom and bounce effects

myMenu.zoomPercent = 150;


useHandCursor

Boolean value defines whether to display hand cursor or not

myMenu.useHandCursor = false;


disableCurrent

Boolean value defines whether current menu button is disabled or not

myMenu.disableCurrent = false;


embeddedFonts

Boolean value defines whether to use embedded fonts or not

myMenu.embeddedFonts = true;


upFont

Sets the main(up) font for the menu buttons

myMenu.upFont ="Arial";


upFontSize

Sets the main(up) font size for the menu buttons

myMenu.upFontSize="12";

upFontColor

Sets the main(up) text color for the menu buttons

myMenu.upFontColor = 0x000000;


upFontStyle

Sets the main(up) text color for the menu buttons

myMenu.upFontStyle = "bold";

Options:

normal
bold
italic
underline
bold-italic
italic-underline
bold-underline
bold-italic-underline

overFont

Sets the over font for the menu buttons

myMenu.overFont ="Arial";


overFontSize

Sets the over font size for the menu buttons

myMenu.overFontSize="12";


overFontColor

Sets the over text color for the menu buttons

myMenu.overFontColor = 0x000000;


overFontStyle

Sets the over font style for the menu buttons

myMenu.overFontStyle = "bold";

Options:

normal
bold
italic
underline
bold-italic
italic-underline
bold-underline
bold-italic-underline


currentFont

Sets the current font for the menu buttons

myMenu.currentFont ="Arial";


currentFontSize

Sets the current font size for the menu buttons

myMenu.currentFontSize="12";


currentFontColor

Sets the current text color for the menu buttons

myMenu.currentFontColor = 0x000000;


currentFontStyle

Sets the current font style for the menu buttons

myMenu.currentFontStyle = "bold";

Options:

normal
bold
italic
underline
bold-italic
italic-underline
bold-underline
bold-italic-underline


clickedMark

Sets the current font style for the menu buttons

myMenu.clickedMark = true;

clickedColor

Color of clicked menu items (if clickedMark is set to true)

myMenu.clickedFontColor = 0xCCCCCC;

 

METHODS

loadMenuArrays

Loads button and link arrays into the menu

myMenu.loadMenuArrays(buttonArray, linkArray);


init

Reinitializes the menu with new data or settings

myMenu.init();


getCurrentMenuID

Returns the ID of the current menu button

var id = myMenu.getCurrentMenuID();


getCurrentMenuName

Returns the name of the current menu button

var name = myMenu.getCurrentMenuName();


getCurrentOverID

Returns the ID of the current rollover menu button

var id = myMenu.getCurrentOverID();


getCurrentOverName

Returns the name of the current rollover menu button

var name = myMenu.getCurrentOverName();



getCurrentOutID

Returns the ID of the menu button on which the rollout last occurred

var id = myMenu.getCurrentOutID();


getCurrentOutName

Returns the name of the menu button on which the rollout last occurred

var name = myMenu.getCurrentOutName();


xmlLoaded

Returns the loaded status of the XML file

myMenu.xmlLoaded;

 

EVENTS

onMenuRelease

Event called a menu button is released


onMenuPress

Event called when a menu button is pressed


onMenuRollOver

Event called on rollover of any menu button


onMenuRollOut

Event called on rollout of any menu button