Packagecom.gestureworks.cml.element
Classpublic class DropDownMenu
InheritanceDropDownMenu Inheritance ElementFactory Inheritance flash.display.Sprite

Drop down menu is used to create a simple menu from a text string of items. The menuItems are a comma separated list of items to populate the menu.
     
        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

Menu
OrbMenu


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
[override] [write-only] sets the alpha for display objects
ElementFactory
 Inheritedblur : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedbottom : Number
sets the bottom value
ElementFactory
 Inheritedclass_ : String
Object's css class;
ElementFactory
 InheritedclassName : String
sets the class name of displayobject
ElementFactory
 InheritedcmlIndex : int
sets the cml index
ElementFactory
  color : uint
The text color
DropDownMenu
 InheriteddebugStyle : *
sets the debug style
ElementFactory
 InheriteddisplayEvents : String
Use for dispatch completes.
ElementFactory
 InheriteddropShadow : 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
 Inheritedheight : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedheightPercent : String
sets the height percent of display object
ElementFactory
 InheritedhorizontalCenter : Number
sets the horizontal center of display object
ElementFactory
 Inheritedid : String
sets the id of child
ElementFactory
 Inheritedindex : int
sets the index of display object
ElementFactory
 Inheritedleft : 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
 InheritedpropertyStates : Array
Deprecated: Please Use state
ElementFactory
 Inheritedright : Number
sets the right value
ElementFactory
 Inheritedscale : Number
Sets both the x and y scale values
ElementFactory
 InheritedscaleX : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedscaleY : Number
[override] Sets width of the display object in pixels
ElementFactory
 Inheritedstate : Array
property states array
ElementFactory
 Inheritedtop : Number
sets top value
ElementFactory
 InheritedverticalCenter : Number
sets the vertical center of display object
ElementFactory
 Inheritedwidth : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedwidthPercent : String
sets the percent of width of display object
ElementFactory
Protected Properties
 PropertyDefined By
  menuItemsArray : Array
DropDownMenu
Public Methods
 MethodDefined By
  
dropdown menu Constructor
DropDownMenu
 Inherited
clone():*
Returns clone of self
ElementFactory
  
[override] CML display initialization callback creates menu
DropDownMenu
  
dispose():void
[override] Dispose methods and remove listeners
DropDownMenu
  
init():void
[override] inialisation method
DropDownMenu
 Inherited
parseCML(cml:XMLList):XMLList
parses cml file
ElementFactory
 Inherited
postparseCML(cml:XMLList):void
post parses the cml file
ElementFactory
 Inherited
updateProperties(state:Number = 0):void
this method updates the properties
ElementFactory
Property Detail
colorproperty
color:uint

The text color

The default value is blue.


Implementation
    public function get color():uint
    public function set color(value:uint):void
fillproperty 
fill:uint

Background color for the menu, default grey

The default value is 0x777777.


Implementation
    public function get fill():uint
    public function set fill(value:uint):void
fontproperty 
font:String

Font style of the menu

The default value is OpenSansRegular.


Implementation
    public function get font():String
    public function set font(value:String):void
fontSizeproperty 
fontSize:Number

defines the font size

The default value is 15;.


Implementation
    public function get fontSize():Number
    public function set fontSize(value:Number):void
menuItemsproperty 
menuItems:String

The items that will populate the expanding menu panel


Implementation
    public function get menuItems():String
    public function set menuItems(value:String):void
menuItemsArrayproperty 
protected var menuItemsArray:Array

menuMarkerproperty 
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.


Implementation
    public function get menuMarker():Boolean
menuTitleproperty 
menuTitle:String

The menu's title that will always be visible.


Implementation
    public function get menuTitle():String
    public function set menuTitle(value:String):void
Constructor Detail
DropDownMenu()Constructor
public function DropDownMenu()

dropdown menu Constructor

Method Detail
displayComplete()method
override public function displayComplete():void

CML display initialization callback creates menu

dispose()method 
override public function dispose():void

Dispose methods and remove listeners

init()method 
override public function init():void

inialisation method