ActionScript 3.0 Language and Components Reference [openASDocs]

DropDown

Properties | Methods | Events
DropDown by Leandro Silva

Package com.tremorvideo.assets
Class public class DropDown
Inheritance DropDown Sprite
Language Version: ActionScript 3.0
Runtime Versions: Flash Player 9, AIR 1.0, Flash Lite 4

Create drop-down menus.

Custom fonts
To use a custom font, first add the font to your library. Then give it a Linkage name. Finally, assign the embeddedFont param in the constructor the given Linkage-Class name ( i.e. new DropDown(125, 25, "myFontClassName"); ).

See also

com.tremorvideo.evts.DropDownEvent



Public Properties


Property
Defined By
arrowColor : uint = 0x444444
The arrow color.
DropDown
arrowOverColor : uint = 0x000000
The arrow's over-state color.
DropDown
clickToDrop : Boolean = true
Click to open the drop-down container.
DropDown
initialValue : String = "Select"
The initial value.
DropDown
listColor : uint = 0x999999
The main container color.
DropDown
listOverColor : uint = 0xA9A9A9
The list item's over-state color.
DropDown
naturalScrollWheel : Boolean = true
Defines the mouse wheel scroll direction.
DropDown
roundCorners : uint = null
Round the container edges.
DropDown
selectedValue : *
[read only] The selected value.
DropDown
txtColor : uint = 0x111111
The font color.
DropDown
txtSize : uint = 12
The font size.
DropDown
updateView : Boolean = true
Updates the drop-down's view to show the selected value.
DropDown
values : Array = ["-empty-"]
An array of drop-down list items.
DropDown
visibleAmount : uint = null
On drop-down, the amount of list items to show at a time. The rest will scroll. Set to 0 to show all.
DropDown

Public Methods


Method
Defined By
DropDown(w:Number, h:Number, embeddedFontLinkageName:String = null)
Creates an instance of DropDown. The drop-down's main container height cannot be larger than half of it's width (i.e. if the width is 100, the height cannot be larger than 50).
DropDown
addValuesAt(values:Array, index:uint = uint.MAX_VALUE):void
Adds values to the drop-down if they do not exist.
DropDown
mapValue(see:String, trueValue:*):String
Maps one value to another. Example: mapValue("This is...", "This is a test") or mapValue("option 1", {foo: bar}).
DropDown
removeValueAt(index:uint):void
Removes an item from the drop-down.
DropDown
resetValues(initialValue:String, values:Array, visibleAmount:uint = 0):void
Resets the values of the drop-down.
DropDown

Events


Event
Summary
Defined By
listSelected
Dispatched if internet connection is available.
DropDown

Created May 18 2015