| Package | com.gestureworks.cml.element |
| Class | public class DropDownMenu |
| Inheritance | DropDownMenu ElementFactory flash.display.Sprite |
var ddMenu:DropDownMenu = new DropDownMenu();
ddMenu.x = 500;
ddMenu.y = 150;
ddMenu.fill = 0xf2d4c2;
ddMenu.color = 0xA66874;
ddMenu.fontSize = 36;
ddMenu.menuTitle = "Images";
ddMenu.menuItems = "Image1,Image2,Image3,Image4,Image5";
addChild(ddMenu);
ddMenu.init();
// This is the event listener for when a menu item has been selected.
ddMenu.addEventListener(StateEvent.CHANGE, onItemSelected);
function onItemSelected(e:StateEvent):void {
//trace("OnItemSelected", e.value);
}
See also
| Property | Defined By | ||
|---|---|---|---|
![]() | alpha : Number [override] [write-only]
sets the alpha for display objects
| ElementFactory | |
![]() | blur : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | bottom : Number
sets the bottom value
| ElementFactory | |
![]() | class_ : String
Object's css class;
| ElementFactory | |
![]() | className : String
sets the class name of displayobject
| ElementFactory | |
![]() | cmlIndex : int
sets the cml index
| ElementFactory | |
| color : uint
The text color
| DropDownMenu | ||
![]() | debugStyle : *
sets the debug style
| ElementFactory | |
![]() | displayEvents : String
Use for dispatch completes. | ElementFactory | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| ElementFactory | |
| fill : uint
Background color for the menu, default grey
| DropDownMenu | ||
| font : String
Font style of the menu
| DropDownMenu | ||
| fontSize : Number
defines the font size
| DropDownMenu | ||
![]() | height : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | heightPercent : String
sets the height percent of display object
| ElementFactory | |
![]() | horizontalCenter : Number
sets the horizontal center of display object
| ElementFactory | |
![]() | id : String
sets the id of child
| ElementFactory | |
![]() | index : int
sets the index of display object
| ElementFactory | |
![]() | left : Number
sets left value
| ElementFactory | |
| menuItems : String
The items that will populate the expanding menu panel
| DropDownMenu | ||
| menuMarker : Boolean [read-only]
Sets whether or not to display a triangle to help indicate this is a drop down menu. | DropDownMenu | ||
| menuTitle : String
The menu's title that will always be visible. | DropDownMenu | ||
![]() | propertyStates : Array Deprecated: Please Use state | ElementFactory | |
![]() | right : Number
sets the right value
| ElementFactory | |
![]() | scale : Number
Sets both the x and y scale values
| ElementFactory | |
![]() | scaleX : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | scaleY : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | state : Array
property states array
| ElementFactory | |
![]() | top : Number
sets top value
| ElementFactory | |
![]() | verticalCenter : Number
sets the vertical center of display object
| ElementFactory | |
![]() | width : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | widthPercent : String
sets the percent of width of display object
| ElementFactory | |
| Property | Defined By | ||
|---|---|---|---|
| menuItemsArray : Array | DropDownMenu | ||
| Method | Defined By | ||
|---|---|---|---|
dropdown menu Constructor
| DropDownMenu | ||
![]() | clone():*
Returns clone of self
| ElementFactory | |
displayComplete():void [override]
CML display initialization callback
creates menu
| DropDownMenu | ||
dispose():void [override]
Dispose methods and remove listeners
| DropDownMenu | ||
init():void [override]
inialisation method
| DropDownMenu | ||
![]() | parseCML(cml:XMLList):XMLList
parses cml file
| ElementFactory | |
![]() | postparseCML(cml:XMLList):void
post parses the cml file
| ElementFactory | |
![]() | updateProperties(state:Number = 0):void
this method updates the properties
| ElementFactory | |
| color | property |
color:uintThe text color
The default value is blue.
public function get color():uint public function set color(value:uint):void| fill | property |
fill:uintBackground color for the menu, default grey
The default value is 0x777777.
public function get fill():uint public function set fill(value:uint):void| font | property |
font:StringFont style of the menu
The default value is OpenSansRegular.
public function get font():String public function set font(value:String):void| fontSize | property |
fontSize:Numberdefines the font size
The default value is 15;.
public function get fontSize():Number public function set fontSize(value:Number):void| menuItems | property |
menuItems:StringThe items that will populate the expanding menu panel
public function get menuItems():String public function set menuItems(value:String):void| menuItemsArray | property |
protected var menuItemsArray:Array| menuMarker | property |
menuMarker:Boolean [read-only] Sets whether or not to display a triangle to help indicate this is a drop down menu.
The default value is true.
public function get menuMarker():Boolean| menuTitle | property |
menuTitle:StringThe menu's title that will always be visible.
public function get menuTitle():String public function set menuTitle(value:String):void| DropDownMenu | () | Constructor |
public function DropDownMenu()dropdown menu Constructor
| displayComplete | () | method |
override public function displayComplete():voidCML display initialization callback creates menu
| dispose | () | method |
override public function dispose():voidDispose methods and remove listeners
| init | () | method |
override public function init():voidinialisation method