Package | com.gestureworks.cml.elements |
Class | public class DropDownMenu |
Inheritance | DropDownMenu ![]() ![]() |
Subclasses | PopupMenu |
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 | ||
---|---|---|---|
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
color : uint
The text color
| DropDownMenu | ||
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
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 | ||
![]() | group : String | TouchContainer | |
![]() | height : Number [override]
sets the height of the container
| TouchContainer | |
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
menuItems : String
The items that will populate the expanding menu panel
| DropDownMenu | ||
menuMarker : Boolean
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 | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
open : Boolean [read-only] | DropDownMenu | ||
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
![]() | position : *
Sets the position
| TouchContainer | |
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : Boolean
When set true this containers children's y position will be laid out relatively
to each other. | TouchContainer | |
showPopupBg : Boolean
Shows the popup background
| DropDownMenu | ||
showTitleBg : Boolean
Shows the title background
| DropDownMenu | ||
![]() | sound : String | TouchContainer | |
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | toBitmap : Boolean | TouchContainer | |
![]() | width : Number [override]
sets the width of the container
| TouchContainer | |
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Property | Defined By | ||
---|---|---|---|
![]() | cmlGestureList : Object | TouchContainer | |
_color : uint = 0x0000ff | DropDownMenu | ||
_currentObject : Text | DropDownMenu | ||
_currentSelection : String | DropDownMenu | ||
_fill : uint = 0x777777 | DropDownMenu | ||
_font : String = OpenSansRegular | DropDownMenu | ||
_fontSize : Number = 15 | DropDownMenu | ||
_height : Number | DropDownMenu | ||
_hit : Sprite | DropDownMenu | ||
_itemBackgrounds : Array | DropDownMenu | ||
_menuItems : String = Item1, Item2 | DropDownMenu | ||
_menuItemsArray : Array | DropDownMenu | ||
menuItemsArray : Array | DropDownMenu | ||
_menuMarker : Boolean = true | DropDownMenu | ||
_menuTitle : Text | DropDownMenu | ||
_open : Boolean = false | DropDownMenu | ||
_showPopupBg : Boolean = true | DropDownMenu | ||
_showTitleBg : Boolean = true | DropDownMenu | ||
_title : String = Menu Title | DropDownMenu | ||
triangle : Graphic | DropDownMenu | ||
_width : Number | DropDownMenu |
Method | Defined By | ||
---|---|---|---|
dropdown menu Constructor
| DropDownMenu | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | clone():*
Clone method
| TouchContainer | |
dispose():void [override]
Destructor
| DropDownMenu | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
hideMenu(noDispatch:Boolean = false):void | DropDownMenu | ||
init():void [override]
inialisation method
| DropDownMenu | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
onDownHit(event:* = null):void | DropDownMenu | ||
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
showMenu(noDispatch:Boolean = false):void | DropDownMenu | ||
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
createHit():void | DropDownMenu | ||
createMenu():void | DropDownMenu | ||
createMenuItem(s:String, idIn:String):Text | DropDownMenu | ||
onItemOut(event:*):void | DropDownMenu | ||
onItemSelected(event:*):void | DropDownMenu | ||
onMenuOut(event:*):void | DropDownMenu | ||
onOver(event:*):void | DropDownMenu |
_color | property |
protected var _color:uint = 0x0000ff
_currentObject | property |
protected var _currentObject:Text
_currentSelection | property |
protected var _currentSelection:String
_fill | property |
protected var _fill:uint = 0x777777
_font | property |
protected var _font:String = OpenSansRegular
_fontSize | property |
protected var _fontSize:Number = 15
_height | property |
protected var _height:Number
_hit | property |
protected var _hit:Sprite
_itemBackgrounds | property |
protected var _itemBackgrounds:Array
_menuItems | property |
protected var _menuItems:String = Item1, Item2
_menuItemsArray | property |
protected var _menuItemsArray:Array
_menuMarker | property |
protected var _menuMarker:Boolean = true
_menuTitle | property |
protected var _menuTitle:Text
_open | property |
protected var _open:Boolean = false
_showPopupBg | property |
protected var _showPopupBg:Boolean = true
_showTitleBg | property |
protected var _showTitleBg:Boolean = true
_title | property |
protected var _title:String = Menu Title
_width | property |
protected var _width:Number
color | property |
color:uint
The text color
The default value is blue
.
public function get color():uint
public function set color(value:uint):void
fill | property |
fill:uint
Background 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:String
Font style of the menu
The default value is OpenSansRegular
.
public function get font():String
public function set font(value:String):void
fontSize | property |
fontSize:Number
defines the font size
The default value is 15;
.
public function get fontSize():Number
public function set fontSize(value:Number):void
menuItems | property |
menuItems:String
The 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
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
public function set menuMarker(value:Boolean):void
menuTitle | property |
menuTitle:String
The menu's title that will always be visible.
public function get menuTitle():String
public function set menuTitle(value:String):void
open | property |
open:Boolean
[read-only] public function get open():Boolean
showPopupBg | property |
showPopupBg:Boolean
Shows the popup background
The default value is 0x777777
.
public function get showPopupBg():Boolean
public function set showPopupBg(value:Boolean):void
showTitleBg | property |
showTitleBg:Boolean
Shows the title background
The default value is 0x777777
.
public function get showTitleBg():Boolean
public function set showTitleBg(value:Boolean):void
triangle | property |
protected var triangle:Graphic
DropDownMenu | () | Constructor |
public function DropDownMenu()
dropdown menu Constructor
createHit | () | method |
protected function createHit():void
createMenu | () | method |
protected function createMenu():void
createMenuItem | () | method |
protected function createMenuItem(s:String, idIn:String):Text
Parameters
s:String | |
idIn:String |
Text |
dispose | () | method |
override public function dispose():void
Destructor
hideMenu | () | method |
public function hideMenu(noDispatch:Boolean = false):void
Parameters
noDispatch:Boolean (default = false )
|
init | () | method |
override public function init():void
inialisation method
onDownHit | () | method |
public function onDownHit(event:* = null):void
Parameters
event:* (default = null )
|
onItemOut | () | method |
protected function onItemOut(event:*):void
Parameters
event:* |
onItemSelected | () | method |
protected function onItemSelected(event:*):void
Parameters
event:* |
onMenuOut | () | method |
protected function onMenuOut(event:*):void
Parameters
event:* |
onOver | () | method |
protected function onOver(event:*):void
Parameters
event:* |
showMenu | () | method |
public function showMenu(noDispatch:Boolean = false):void
Parameters
noDispatch:Boolean (default = false )
|