| Package | fl.controls | 
| Class | public class SelectableList | 
| Inheritance | SelectableList    BaseScrollPane   UIComponent   Sprite   DisplayObjectContainer   InteractiveObject   DisplayObject   EventDispatcher   Object | 
| Implements | IFocusManagerComponent | 
| Subclasses | DataGrid, List, TileList | 
| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Note: This class does not create a component; it is exposed only so that it can be extended.
See also
| Property | Defined By | ||
|---|---|---|---|
![]()  | accessibilityProperties : AccessibilityProperties 
     The current accessibility options for this display object.  | DisplayObject | |
| allowMultipleSelection : Boolean 
		 Gets a Boolean value that indicates whether more than one list item 
		 can be selected at a time.  | SelectableList | ||
![]()  | alpha : Number 
     Indicates the alpha transparency value of the object specified.  | DisplayObject | |
![]()  | blendMode : String 
     A value from the BlendMode class that specifies which blend mode to use.  | DisplayObject | |
![]()  | blendShader : Shader [write-only] 
     Sets a shader that is used for blending the foreground and background.  | DisplayObject | |
![]()  | buttonMode : Boolean 
     Specifies the button mode of this sprite.  | Sprite | |
![]()  | cacheAsBitmap : Boolean 
     If set to true, Flash Player or Adobe AIR caches an internal bitmap representation of the
     display object.  | DisplayObject | |
![]()  | constructor : Object 
	 A reference to the class object or constructor function for a given object instance.  | Object | |
![]()  | contextMenu : NativeMenu  
	 Specifies the context menu associated with this object.  | InteractiveObject | |
| dataProvider : DataProvider 
		 Gets or sets the data model of the list of items to be viewed.  | SelectableList | ||
![]()  | doubleClickEnabled : Boolean  
	 Specifies whether the object receives doubleClick events.  | InteractiveObject | |
![]()  | dropTarget : DisplayObject [read-only] 
	 Specifies the display object over which the sprite is being dragged, or on
	 which the sprite was dropped.  | Sprite | |
![]()  | enabled : Boolean 
         Gets or sets a value that indicates whether the component can accept user interaction.  | UIComponent | |
![]()  | filters : Array 
     An indexed array that contains each filter object currently associated with the display object.  | DisplayObject | |
![]()  | focusEnabled : Boolean 
         Gets or sets a Boolean value that indicates whether the component can receive focus 
         after the user clicks it.  | UIComponent | |
![]()  | focusManager : IFocusManager 
         Gets or sets the FocusManager that controls focus for this component and its
         peers.  | UIComponent | |
![]()  | focusRect : Object  
	 Specifies whether this object displays a focus rectangle.  | InteractiveObject | |
![]()  | graphics : Graphics [read-only] 
     Specifies the Graphics object that belongs to this sprite where vector
     drawing commands can occur.  | Sprite | |
![]()  | height : Number [override] 
         Gets or sets the height of the component, in pixels.  | UIComponent | |
![]()  | hitArea : Sprite 
	 Designates another sprite to serve as the hit area for a sprite.  | Sprite | |
![]()  | horizontalLineScrollSize : Number 
		 Gets or sets a value that describes the amount of content to be scrolled,
		 horizontally, when a scroll arrow is clicked.  | BaseScrollPane | |
![]()  | horizontalPageScrollSize : Number 
		 Gets or sets the count of pixels by which to move the scroll thumb 
		 on the horizontal scroll bar when the scroll bar track is pressed.  | BaseScrollPane | |
![]()  | horizontalScrollBar : ScrollBar [read-only] 
		 Gets a reference to the horizontal scroll bar.  | BaseScrollPane | |
![]()  | horizontalScrollPolicy : String 
         Gets or sets a value that indicates the state of the horizontal scroll
		 bar.  | BaseScrollPane | |
![]()  | horizontalScrollPosition : Number 
		 Gets or sets a value that describes the horizontal position of the 
		 horizontal scroll bar in the scroll pane, in pixels.  | BaseScrollPane | |
| length : uint [read-only] 
         Gets the number of items in the data provider.  | SelectableList | ||
![]()  | loaderInfo : LoaderInfo [read-only] 
     Returns a LoaderInfo object containing information about loading the file
     to which this display object belongs.  | DisplayObject | |
![]()  | mask : DisplayObject 
     The calling display object is masked by the specified mask object.  | DisplayObject | |
| maxHorizontalScrollPosition : Number [override] 
		 Gets or sets the number of pixels that the list scrolls to the right when the
         horizontalScrollPolicy property is set to ScrollPolicy.ON.  | SelectableList | ||
![]()  | maxVerticalScrollPosition : Number [read-only] 
		 Gets the maximum vertical scroll position for the current content, in pixels.  | BaseScrollPane | |
![]()  | mouseChildren : Boolean 
	 Determines whether or not the children of the object are mouse enabled.  | DisplayObjectContainer | |
![]()  | mouseEnabled : Boolean  
	 Specifies whether this object receives mouse messages.  | InteractiveObject | |
![]()  | mouseFocusEnabled : Boolean 
         Gets or sets a value that indicates whether the component can receive focus after 
         the user clicks it.  | UIComponent | |
![]()  | mouseX : Number [read-only] 
     Indicates the x coordinate of the mouse position, in pixels.  | DisplayObject | |
![]()  | mouseY : Number [read-only] 
     Indicates the y coordinate of the mouse position, in pixels.  | DisplayObject | |
![]()  | name : String 
     Indicates the instance name of the DisplayObject.  | DisplayObject | |
![]()  | numChildren : int [read-only] 
	 Returns the number of children of this object.  | DisplayObjectContainer | |
![]()  | opaqueBackground : Object 
     Specifies whether the display object is opaque with a certain background color.  | DisplayObject | |
![]()  | parent : DisplayObjectContainer [read-only] 
     Indicates the DisplayObjectContainer object that contains this display object.  | DisplayObject | |
![]()  | prototype : Object [static] 
	 A reference to the prototype object of a class or function object.  | Object | |
![]()  | root : DisplayObject [read-only] 
     For a display object in a loaded SWF file, the root property is the 
     top-most display object in the portion of the display list's tree structure represented by that SWF file.  | DisplayObject | |
![]()  | rotation : Number 
     Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.  | DisplayObject | |
![]()  | rotationX : Number 
     Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.  | DisplayObject | |
![]()  | rotationY : Number 
     Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.  | DisplayObject | |
![]()  | rotationZ : Number 
     Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.  | DisplayObject | |
| rowCount : uint [read-only] 
		 Gets the number of rows that are at least partially visible in the list.  | SelectableList | ||
![]()  | scale9Grid : Rectangle 
     The current scaling grid that is in effect.  | DisplayObject | |
![]()  | scaleX : Number [override] 
         Multiplies the current width of the component by a scale factor.  | UIComponent | |
![]()  | scaleY : Number [override] 
         Multiplies the current height of the component by a scale factor.  | UIComponent | |
![]()  | scaleZ : Number 
     Indicates the depth scale (percentage) of an object as applied from the registration point of the object.  | DisplayObject | |
![]()  | scrollRect : Rectangle 
     The scroll rectangle bounds of the display object.  | DisplayObject | |
| selectable : Boolean 
         Gets or sets a Boolean value that indicates whether the items in the list 
		 can be selected.  | SelectableList | ||
| selectedIndex : int 
		 Gets or sets the index of the item that is selected in a single-selection
		 list.  | SelectableList | ||
| selectedIndices : Array 
		 Gets or sets an array that contains the items that were selected from
		 a multiple-selection list.  | SelectableList | ||
| selectedItem : Object 
		 Gets or sets the item that was selected from a single-selection list.  | SelectableList | ||
| selectedItems : Array 
		 Gets or sets an array that contains the objects for the  
		 items that were selected from the multiple-selection list.  | SelectableList | ||
![]()  | soundTransform : flash.media:SoundTransform 
	 Controls sound within this sprite.  | Sprite | |
![]()  | stage : Stage [read-only] 
     The Stage of the display object.  | DisplayObject | |
![]()  | tabChildren : Boolean 
	 Determines whether the children of the object are tab enabled.  | DisplayObjectContainer | |
![]()  | tabEnabled : Boolean  
	 Specifies whether this object is in the tab order.  | InteractiveObject | |
![]()  | tabIndex : int  
   	 Specifies the tab ordering of objects in a SWF file.  | InteractiveObject | |
![]()  | textSnapshot : flash.text:TextSnapshot [read-only] 
     Returns a TextSnapshot object for this DisplayObjectContainer instance.  | DisplayObjectContainer | |
![]()  | transform : flash.geom:Transform 
    An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.  | DisplayObject | |
![]()  | useBitmapScrolling : Boolean 
		 When set to true, the cacheAsBitmap property for the scrolling content is set 
		 to true; when set to false this value is turned off.  | BaseScrollPane | |
![]()  | useHandCursor : Boolean 
	 A Boolean value that indicates whether the pointing hand (hand cursor) appears when the mouse rolls 
	 over a sprite in which the buttonMode property is set to true.  | Sprite | |
![]()  | version : String = "3.0.0.16" 
         The version number of the components.  | UIComponent | |
![]()  | verticalLineScrollSize : Number 
		 Gets or sets a value that describes how many pixels to scroll vertically when a scroll arrow is clicked.  | BaseScrollPane | |
![]()  | verticalPageScrollSize : Number 
         Gets or sets the count of pixels by which to move the scroll thumb 
		 on the vertical scroll bar when the scroll bar track is pressed.  | BaseScrollPane | |
![]()  | verticalScrollBar : ScrollBar [read-only] 
		 Gets a reference to the vertical scroll bar.  | BaseScrollPane | |
![]()  | verticalScrollPolicy : String 
         Gets or sets a value that indicates the state of the vertical scroll
		 bar.  | BaseScrollPane | |
![]()  | verticalScrollPosition : Number 
		 Gets or sets a value that describes the vertical position of the 
		 vertical scroll bar in the scroll pane, in pixels.  | BaseScrollPane | |
![]()  | visible : Boolean [override] 
         Gets or sets a value that indicates whether the current component instance is visible.  | UIComponent | |
![]()  | width : Number [override] 
         Gets or sets the width of the component, in pixels.  | UIComponent | |
![]()  | x : Number [override] 
         Gets or sets the x coordinate that represents the position of the component along
         the x axis within its parent container.  | UIComponent | |
![]()  | y : Number [override] 
         Gets or sets the y coordinate that represents the position of the component along 
         the y axis within its parent container.  | UIComponent | |
![]()  | z : Number 
     Indicates the z coordinate position along the z-axis of the DisplayObject
     instance relative to the 3D parent container.  | DisplayObject | |
| Method | Defined By | ||
|---|---|---|---|
         Creates a new SelectableList instance.  | SelectableList | ||
![]()  | 
     Adds a child DisplayObject instance to this DisplayObjectContainer instance.  | DisplayObjectContainer | |
![]()  | 
	 Adds a child DisplayObject instance to this DisplayObjectContainer 
	 instance.  | DisplayObjectContainer | |
![]()  | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void 
	Registers an event listener object with an EventDispatcher object so that the listener 
	receives notification of an event.  | EventDispatcher | |
		 Appends an item to the end of the list of items.  | SelectableList | ||
		 Inserts an item into the list at the specified index location.  | SelectableList | ||
![]()  | 
	 Indicates whether the security restrictions 
	 would cause any display objects to be omitted from the list returned by calling
	 the DisplayObjectContainer.getObjectsUnderPoint() method
	 with the specified point point.  | DisplayObjectContainer | |
		 Clears a style that is set on the renderers in the list.  | SelectableList | ||
         Clears the currently selected item in the list and sets the selectedIndex property to -1.  | SelectableList | ||
![]()  | 
         Deletes a style property from this component instance.  | UIComponent | |
![]()  | 
	 Determines whether the specified display object is a child of the DisplayObjectContainer instance or
	 the instance itself.  | DisplayObjectContainer | |
![]()  | 
	Dispatches an event into the event flow.  | EventDispatcher | |
![]()  | 
         Shows or hides the focus indicator on this component.  | UIComponent | |
![]()  | 
         Initiates an immediate draw operation, without invalidating everything as invalidateNow does.  | UIComponent | |
![]()  | 
     Returns a rectangle that defines the area of the display object relative to the coordinate system
     of the targetCoordinateSpace object.  | DisplayObject | |
![]()  | 
     Returns the child display object instance that exists at the specified index.  | DisplayObjectContainer | |
![]()  | 
     Returns the child display object that exists with the specified name.  | DisplayObjectContainer | |
![]()  | 
     Returns the index position of a child DisplayObject instance.  | DisplayObjectContainer | |
![]()  | 
         Retrieves the object that currently has focus.  | UIComponent | |
		 Retrieves the item at the specified index.  | SelectableList | ||
		 Returns the index of the next item in the dataProvider in which
		 the label's first character matches a specified string character.  | SelectableList | ||
![]()  | 
     Returns an array of objects that lie under the specified point and are children 
     (or grandchildren, and so on) of this DisplayObjectContainer instance.  | DisplayObjectContainer | |
![]()  | 
    Returns a rectangle that defines the boundary of the display object, 
    based on the coordinate system defined by the targetCoordinateSpace 
    parameter, excluding any strokes on shapes.  | DisplayObject | |
		 Retrieves a style that is set on the renderers in the list.  | SelectableList | ||
![]()  | 
         Retrieves a style property that is set in the style lookup 
         chain of the component.  | UIComponent | |
[static] 
         Retrieves the default style map for the current component.  | SelectableList | ||
![]()  | 
     Converts the point object from the Stage (global) coordinates
     to the display object's (local) coordinates.  | DisplayObject | |
![]()  | 
     Converts a two-dimensional point from the Stage (global) coordinates to a
     three-dimensional display object's (local) coordinates.  | DisplayObject | |
![]()  | 
	Checks whether the EventDispatcher object has any listeners registered for a specific type 
	of event.  | EventDispatcher | |
![]()  | 
	 Indicates whether an object has a specified property defined.  | Object | |
![]()  | 
     Evaluates the bounding box of the display object to see if it overlaps or intersects with the
     bounding box of the obj display object.  | DisplayObject | |
![]()  | 
     Evaluates the display object to see if it overlaps or intersects with the
     point specified by the x and y parameters.  | DisplayObject | |
![]()  | 
         Marks a property as invalid and redraws the component on the
         next frame unless otherwise specified.  | UIComponent | |
		 Invalidates a specific item renderer.  | SelectableList | ||
		 Invalidates the renderer for the item at the specified index.  | SelectableList | ||
		 Invalidates the whole list, forcing the list items to be redrawn.  | SelectableList | ||
		 Checks whether the specified item is selected in the list.  | SelectableList | ||
![]()  | 
	 Indicates whether an instance of the Object class is in the prototype chain of the object specified 
	 as the parameter.  | Object | |
 
		 Retrieves the ICellRenderer for a given item object, if there is one.  | SelectableList | ||
		 Retrieves the string that the renderer displays for the given data object 
         based on the label properties of the object.  | SelectableList | ||
![]()  | 
     Converts a three-dimensional point of the three-dimensional display 
     object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.  | DisplayObject | |
![]()  | 
     Converts the point object from the display object's (local) coordinates to the
     Stage (global) coordinates.  | DisplayObject | |
![]()  | [static] 
         Merges the styles from multiple classes into one object.  | UIComponent | |
![]()  | 
         Moves the component to the specified position within its parent.  | UIComponent | |
![]()  | 
	 Indicates whether the specified property exists and is enumerable.  | Object | |
         Removes all items from the list.  | SelectableList | ||
![]()  | 
	 Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.  | DisplayObjectContainer | |
![]()  | 
	 Removes a child DisplayObject from the specified index position in the child list of 
	 the DisplayObjectContainer.  | DisplayObjectContainer | |
![]()  | 
	Removes a listener from the EventDispatcher object.  | EventDispatcher | |
		 Removes the specified item from the list.  | SelectableList | ||
		 Removes the item at the specified index position.  | SelectableList | ||
		 Replaces the item at the specified index location with another item.  | SelectableList | ||
		 Scrolls the list to the item at the specified index.  | SelectableList | ||
         Scrolls the list to the item at the location indicated by    
		 the current value of the selectedIndex property.  | SelectableList | ||
![]()  | 
	Changes the  position of an existing child in the display object container.  | DisplayObjectContainer | |
![]()  | 
         Sets the focus to this component.  | UIComponent | |
![]()  | 
     Sets the availability of a dynamic property for loop operations.  | Object | |
		 Sets a style on the renderers in the list.  | SelectableList | ||
![]()  | 
         Sets the component to the specified width and height.  | UIComponent | |
![]()  | 
         Sets a style property on this component instance.  | UIComponent | |
		 Sorts the elements of the current data provider.  | SelectableList | ||
		 Sorts the elements of the current data provider by one or more  
		 of its fields.  | SelectableList | ||
![]()  | 
	 Lets the user drag the specified sprite.  | Sprite | |
![]()  | 
	 Ends the startDrag() method.  | Sprite | |
![]()  | 
	 Swaps the z-order (front-to-back order) of the two specified child objects.  | DisplayObjectContainer | |
![]()  | 
	 Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the 
	 child list.  | DisplayObjectContainer | |
![]()  | 
	 Returns the string representation of this object, formatted according to locale-specific conventions.  | Object | |
![]()  | 
	 Returns the string representation of the specified object.  | Object | |
![]()  | 
         Validates and updates the properties and layout of this object, redrawing it
         if necessary.  | UIComponent | |
![]()  | 
	 Returns the primitive value of the specified object.  | Object | |
![]()  | 
	Checks whether an event listener is registered with this EventDispatcher object or any of 
	its ancestors for the specified event type.  | EventDispatcher | |
| Event | Summary | Defined By | ||
|---|---|---|---|---|
![]()  | [broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | ||
![]()  | Dispatched when a display object is added to the display list. | DisplayObject | ||
![]()  | Dispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained. | DisplayObject | ||
| Dispatched when a different item is selected in the list. | SelectableList | |||
![]()  | Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. | InteractiveObject | ||
![]()  | Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject. | InteractiveObject | ||
![]()  | Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application. | InteractiveObject | ||
![]()  | Dispatched when the user activates the platform specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. | InteractiveObject | ||
![]()  | Dispatched when the user activates the platform specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu. | InteractiveObject | ||
![]()  | [broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | ||
![]()  | Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true. | InteractiveObject | ||
![]()  | [broadcast event] Dispatched when the playhead is entering a new frame. | DisplayObject | ||
![]()  | [broadcast event] Dispatched when the playhead is exiting the current frame. | DisplayObject | ||
![]()  | Dispatched after a display object gains focus. | InteractiveObject | ||
![]()  | Dispatched after a display object loses focus. | InteractiveObject | ||
![]()  | [broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run. | DisplayObject | ||
![]()  | Dispatched after the component visibility changes from visible to invisible. | UIComponent | ||
| Dispatched when the user clicks an item in the component. | SelectableList | |||
| Dispatched when the user clicks an item in the component twice in rapid succession. | SelectableList | |||
| Dispatched when the user rolls the pointer off of an item in the component. | SelectableList | |||
| Dispatched when the user rolls the pointer over an item in the component. | SelectableList | |||
![]()  | Dispatched when the user presses a key. | InteractiveObject | ||
![]()  | Dispatched when the user attempts to change focus by using keyboard navigation. | InteractiveObject | ||
![]()  | Dispatched when the user releases a key. | InteractiveObject | ||
![]()  | Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject. | InteractiveObject | ||
![]()  | Dispatched when a user presses the middle pointing device button over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when the user attempts to change focus by using a pointer device. | InteractiveObject | ||
![]()  | Dispatched when a user moves the pointing device while it is over an InteractiveObject. | InteractiveObject | ||
![]()  | Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when a mouse wheel is spun over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched after the component is moved. | UIComponent | ||
![]()  | Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture. | InteractiveObject | ||
![]()  | Dispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop(). | InteractiveObject | ||
![]()  | Dispatched by an InteractiveObject when a drag gesture enters its boundary. | InteractiveObject | ||
![]()  | Dispatched by an InteractiveObject when a drag gesture leaves its boundary. | InteractiveObject | ||
![]()  | Dispatched by an InteractiveObject continually while a drag gesture remains within its boundary. | InteractiveObject | ||
![]()  | Dispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | ||
![]()  | Dispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | ||
![]()  | Dispatched when the user activates the platform specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu. | InteractiveObject | ||
![]()  | Dispatched when a display object is about to be removed from the display list. | DisplayObject | ||
![]()  | Dispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained. | DisplayObject | ||
![]()  | [broadcast event] Dispatched when the display list is about to be updated and rendered. | DisplayObject | ||
![]()  | Dispatched after the component is resized. | UIComponent | ||
![]()  | Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject. | InteractiveObject | ||
![]()  | Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | ||
![]()  | Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | ||
| Dispatched when the user rolls the pointer off of the component. | SelectableList | |||
| Dispatched when the user rolls the pointer over the component. | SelectableList | |||
| Dispatched when the user scrolls horizontally or vertically. | SelectableList | |||
![]()  | Dispatched when the user activates the platform specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu. | InteractiveObject | ||
![]()  | Dispatched after the component visibility changes from invisible to visible. | UIComponent | ||
![]()  | Dispatched when the value of the object's tabChildren flag changes. | InteractiveObject | ||
![]()  | Dispatched when the object's tabEnabled flag changes. | InteractiveObject | ||
![]()  | Dispatched when the value of the object's tabIndex property changes. | InteractiveObject | ||
![]()  | Dispatched when a user enters one or more characters of text. | InteractiveObject | ||
| Style | Description | Defined By | ||
|---|---|---|---|---|
cellRenderer  | Type: Class The class that provides the cell renderer for each item in the component. The default value is  fl.contols.listClasses.CellRenderer. | SelectableList | ||
contentPadding  | Type: Number Format: Length The padding that separates the border of the list from its contents, in pixels. The default value is  null. | SelectableList | ||
disabledAlpha  | Type: Number The alpha value to set the list to when the enabled property is false.
     
      The default value is null. | SelectableList | ||
![]()  | Type: flash.text.TextFormat The TextFormat object to use to render the component label when the button is disabled.  | UIComponent | ||
![]()  | Type: Class Name of the class to use as the skin for the down arrow button of the scroll bar when it is disabled.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the down arrow button of the scroll bar when you click the arrow button.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the down arrow button of the scroll bar when the mouse pointer is over the arrow button.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the down arrow button of the scroll bar.  | BaseScrollPane | ||
![]()  | Type: Number Format: Length The padding that separates the outside boundaries of the component from the outside edges of the focus indicator, in pixels.  | UIComponent | ||
![]()  | Type: Class The skin to be used to display focus indicators.  | UIComponent | ||
![]()  | Type: Number Format: Time The number of milliseconds to wait after the buttonDown event is first dispatched before sending a second buttonDown event. | BaseScrollPane | ||
![]()  | Type: Number Format: Time The interval, in milliseconds, between buttonDown events that are dispatched after the delay that is specified by the repeatDelay style. | BaseScrollPane | ||
skin  | Type: Class The class that provides the skin for the background of the component. The default value is  List_skin. | SelectableList | ||
![]()  | Type: flash.text.TextFormat The TextFormat object to use to render the component label.  | UIComponent | ||
![]()  | Type: Class The skin that is used to indicate the disabled state of the thumb.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the thumb of the scroll bar when you click the thumb.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the icon for the thumb of the scroll bar.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the thumb of the scroll bar when the mouse pointer is over the thumb.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin used for the thumb of the scroll bar.  | BaseScrollPane | ||
![]()  | Type: Class The skin that is used to indicate a disabled track.  | BaseScrollPane | ||
![]()  | Type: Class The skin that is used to indicate the down state of a disabled skin.  | BaseScrollPane | ||
![]()  | Type: Class The skin that is used to indicate the mouseover state for the scroll track.  | BaseScrollPane | ||
![]()  | Type: Class The skin used to indicate the mouse up state for the scroll track.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the up arrow button of the scroll bar when it is disabled.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the up arrow button of the scroll bar when you click the arrow button.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the up arrow button of the scroll bar when the mouse pointer is over the arrow button.  | BaseScrollPane | ||
![]()  | Type: Class Name of the class to use as the skin for the up arrow button of the scroll bar.  | BaseScrollPane | ||
| allowMultipleSelection | property | 
allowMultipleSelection:Boolean| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
		 Gets a Boolean value that indicates whether more than one list item 
		 can be selected at a time. A value of true indicates that 
		 multiple selections can be made at one time; a value of false 
		 indicates that only one item can be selected at one time. 
         
         
 The default value is false.
    public function get allowMultipleSelection():Boolean    public function set allowMultipleSelection(value:Boolean):voidSee also
selectedIndex and selectedIndices properties when the selected items in the list change:
import fl.controls.List;
import fl.data.DataProvider;
var items:XML = <items>
        <item label="Item A" />
        <item label="Item B" />
        <item label="Item C" />
    </items>;
var dp:DataProvider = new DataProvider(items);
var myList:List = new List();
myList.dataProvider = dp;
myList.allowMultipleSelection = true;
myList.move(10, 10);
myList.setSize(320, 240);
myList.addEventListener(Event.CHANGE, changeHandler);
addChild(myList);
function changeHandler(event:Event):void {
    var lst:List = event.currentTarget as List;
    trace("change:");
    trace("\t" + "selectedIndex:", lst.selectedIndex);
    trace("\t" + "selectedIndices:", lst.selectedIndices);
    trace("\t" + "Number selected items:", lst.selectedIndices.length);
}
| dataProvider | property | 
dataProvider:DataProvider| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets or sets the data model of the list of items to be viewed. A data provider can be shared by multiple list-based components. Changes to the data provider are immediately available to all components that use it as a data source.
 The default value is null.
    public function get dataProvider():DataProvider    public function set dataProvider(value:DataProvider):void| length | property | 
length:uint  [read-only] | Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets the number of items in the data provider.
    public function get length():uintrowCount property to the current number of items in the list:
import fl.controls.List;
var myList:List = new List();
myList.addItem({label:"Item A"});
myList.addItem({label:"Item B"});
myList.addItem({label:"Item C"});
myList.addItem({label:"Item D"});
myList.rowCount = myList.length;
myList.move(10, 10);
addChild(myList);
| maxHorizontalScrollPosition | property | 
maxHorizontalScrollPosition:Number[override] | Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
		 Gets or sets the number of pixels that the list scrolls to the right when the
         horizontalScrollPolicy property is set to ScrollPolicy.ON.
         
         
    override public function get maxHorizontalScrollPosition():Number    override public function set maxHorizontalScrollPosition(value:Number):voidSee also
| rowCount | property | 
rowCount:uint  [read-only] | Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets the number of rows that are at least partially visible in the list.
Note: This property must be overridden in any class that extends SelectableList.
 The default value is 0.
    public function get rowCount():uintrowCount property:
import fl.data.DataProvider;
import fl.controls.List;
var dp:DataProvider = new DataProvider();
var i:uint;
for(i=0; i<100; i++) {
    dp.addItem( { label: "Item " + i } );
}
var list:List = new List();
list.setSize(100,300);
list.dataProvider = dp;
addChild(list);
trace(list.rowCount); // 15
| selectable | property | 
selectable:Boolean| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
         Gets or sets a Boolean value that indicates whether the items in the list 
		 can be selected. A value of true indicates that the list items
		 can be selected; a value of false indicates that they cannot be. 
 		 
         
 The default value is true.
    public function get selectable():Boolean    public function set selectable(value:Boolean):voidSee also
| selectedIndex | property | 
selectedIndex:int| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets or sets the index of the item that is selected in a single-selection list. A single-selection list is a list in which only one item can be selected at a time.
A value of -1 indicates that no item is selected; if multiple selections are made, this value is equal to the index of the item that was selected last in the group of selected items.
When ActionScript is used to set this property, the item at the specified index
		 replaces the current selection. When the selection is changed programmatically, 
		 a change event object is not dispatched. 
    public function get selectedIndex():int    public function set selectedIndex(value:int):voidSee also
import fl.controls.List;
import fl.data.DataProvider;
var dp:DataProvider = new DataProvider();
var i:uint;
for (i = 0; i < 5; i++) {
    dp.addItem( { label: "Sample Name"} );
}
var list:List = new List();
list.dataProvider = dp;
list.addEventListener(Event.CHANGE,announceClickedItem)
addChild(list);
function announceClickedItem(e:Event):void {
    trace("You have clicked: " + list.selectedItem.label + " in row " + list.selectedIndex);
}
| selectedIndices | property | 
selectedIndices:Array| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets or sets an array that contains the items that were selected from a multiple-selection list.
To replace the current selection programmatically, you can make an 
		 explicit assignment to this property. You can clear the current selection 
		 by setting this property to an empty array or to a value of undefined. 
		 If no items are selected from the list of items, this property is 
		 undefined. 
The sequence of values in the array reflects the order in which the items
		 were selected from the multiple-selection list. For example, if you click the second 
		 item from the list, then the third item, and finally the first item, this property 
		 contains an array of values in the following sequence: [1,2,0].
    public function get selectedIndices():Array    public function set selectedIndices(value:Array):voidSee also
| selectedItem | property | 
selectedItem:Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets or sets the item that was selected from a single-selection list. For a multiple-selection list in which multiple items are selected, this property contains the item that was selected last.
If no selection is made, the value of this property is null.
    public function get selectedItem():Object    public function set selectedItem(value:Object):voidSee also
import fl.controls.List;
import fl.data.DataProvider;
var dp:DataProvider = new DataProvider();
var i:uint;
for (i = 0; i < 5; i++) {
    dp.addItem( { label: "Sample Name"} );
}
var list:List = new List();
list.dataProvider = dp;
list.addEventListener(Event.CHANGE,announceClickedItem)
addChild(list);
function announceClickedItem(e:Event):void {
    trace("You have clicked: " + list.selectedItem.label + " in row " + list.selectedIndex);
}
| selectedItems | property | 
selectedItems:Array| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Gets or sets an array that contains the objects for the items that were selected from the multiple-selection list.
For a single-selection list, the value of this property is an 
		 array containing the one selected item. In a single-selection 
		 list, the allowMultipleSelection property is set to 
		 false.
    public function get selectedItems():Array    public function set selectedItems(value:Array):voidSee also
import fl.controls.List;
import fl.data.DataProvider;
var listA:List = new List();
listA.allowMultipleSelection = true;
listA.addItem({label:"Item A"});
listA.addItem({label:"Item B"});
listA.addItem({label:"Item C"});
listA.addItem({label:"Item D"});
listA.addItem({label:"Item E"});
listA.addItem({label:"Item F"});
listA.addItem({label:"Item G"});
listA.move(10, 10);
listA.addEventListener(Event.CHANGE, changeHandler);
addChild(listA);
var listB:List = new List();
listB.selectable = false;
listB.move(120, 10);
addChild(listB);
function changeHandler(event:Event):void {
    if (listA.selectedItems.length > 0) {
        listB.dataProvider = new DataProvider(listA.selectedItems);
    }
}
| SelectableList | () | Constructor | 
public function SelectableList()| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Creates a new SelectableList instance.
| addItem | () | method | 
 public function addItem(item:Object):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Appends an item to the end of the list of items.
An item should contain label and data 
		 properties; however, items that contain other properties can also 
		 be added to the list. By default, the label property of 
		 an item is used to display the label of the row; the data 
		 property is used to store the data of the row. 
Parameters
item:Object — The item to be added to the data provider.
         
          | 
See also
| addItemAt | () | method | 
 public function addItemAt(item:Object, index:uint):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Inserts an item into the list at the specified index location. The indices of items at or after the specified index location are incremented by 1.
Parameters
item:Object — The item to be added to the list.
         
          | |
index:uint — The index at which to add the item.
		 
          | 
RangeError  — The specified index is less than 0 or greater than or equal to the length of the data provider.
         
          | 
See also
| clearRendererStyle | () | method | 
 public function clearRendererStyle(name:String, column:int = -1):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Clears a style that is set on the renderers in the list.
Parameters
name:String — The name of the style to be cleared.
		 
          | |
column:int (default = -1) | 
See also
| clearSelection | () | method | 
 public function clearSelection():void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
         Clears the currently selected item in the list and sets the selectedIndex property to -1.
         
         
import fl.controls.Button;
import fl.controls.List;
import fl.data.DataProvider;
var data:XML = <items>
        <item label="Person A" id="p001" />
        <item label="Person B" id="p002" />
        <item label="Person C" id="p003" />
    </items>;
var dp:DataProvider = new DataProvider(data);
var myList:List = new List();
myList.allowMultipleSelection = false;
myList.dataProvider = dp;
myList.move(10, 10);
myList.selectedIndex = 0;
addChild(myList);
var clearButton:Button = new Button();
clearButton.label = "Clear selection";
clearButton.move(120, 10);
clearButton.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(clearButton);
function clickHandler(event:MouseEvent):void {
    trace("selectedIndex (before):", myList.selectedIndex);
    myList.clearSelection();
    trace("selectedIndex (after):", myList.selectedIndex);
}
| getItemAt | () | method | 
 public function getItemAt(index:uint):Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Retrieves the item at the specified index.
Parameters
index:uint — The index of the item to be retrieved.
         
          | 
Object — The object at the specified index location.
		 
          | 
RangeError  — The specified index is less than 0 or greater than or equal to the length of the data provider.
         
          | 
| getNextIndexAtLetter | () | method | 
 public function getNextIndexAtLetter(firstLetter:String, startIndex:int = -1):int| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Returns the index of the next item in the dataProvider in which the label's first character matches a specified string character. If the search reaches the end of the dataProvider without searching all the items, it will loop back to the start. The search does not include the startIndex.
Parameters
firstLetter:String — The string character to search for
		  | |
startIndex:int (default = -1) — The index in the dataProvider to start at.
		 
		  | 
int — The index of the next item in the dataProvider.
		 
          | 
| getRendererStyle | () | method | 
 public function getRendererStyle(name:String, column:int = -1):Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Retrieves a style that is set on the renderers in the list.
Parameters
name:String — The name of the style to be retrieved.
		  | |
column:int (default = -1) — The value of the style to be retrieved.
         
          | 
Object | 
See also
| getStyleDefinition | () | method | 
 public static function getStyleDefinition():Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
         Retrieves the default style map for the current component. The style map contains
         the type that is appropriate for the component, depending on the style that
         the component uses. For example, the disabledTextFormat style 
         contains a value of null or a TextFormat object. 
         You can use these styles and call setStyle() on the current 
         component. The following code overrides the default disabledTextFormat 
         style on the specified component: 
         
componentInstance.setStyle("disabledTextFormat", new TextFormat());Object — Default styles object.
         
          | 
See also
import fl.controls.*;
import fl.containers.*;
import fl.controls.listClasses.*;
import fl.controls.dataGridClasses.*;
import fl.controls.progressBarClasses.*;
import fl.core.UIComponent;
import fl.data.DataProvider;
var dp:DataProvider = new DataProvider();
dp.addItem( { label: "BaseScrollPane",    data:BaseScrollPane } );
dp.addItem( { label: "Button",             data:Button } );
dp.addItem( { label: "CellRenderer",    data:CellRenderer } );
dp.addItem( { label: "CheckBox",         data:CheckBox } );
dp.addItem( { label: "ColorPicker",     data:ColorPicker } );
dp.addItem( { label: "ComboBox",         data:ComboBox } );
dp.addItem( { label: "DataGrid",         data:DataGrid } );
dp.addItem( { label: "HeaderRenderer",    data:HeaderRenderer } );
dp.addItem( { label: "ImageCell",        data:ImageCell } );
dp.addItem( { label: "IndeterminateBar",data:IndeterminateBar } );
dp.addItem( { label: "Label",             data:Label } );
dp.addItem( { label: "List",             data:List } );
dp.addItem( { label: "NumericStepper",     data:NumericStepper } );
dp.addItem( { label: "ProgressBar",     data:ProgressBar } );
dp.addItem( { label: "RadioButton",     data:RadioButton } );
dp.addItem( { label: "ScrollPane",         data:ScrollPane } );
dp.addItem( { label: "Slider",             data:Slider } );
dp.addItem( { label: "TextArea",         data:TextArea } );
dp.addItem( { label: "TextInput",         data:TextInput } );
dp.addItem( { label: "TileList",         data:TileList } );
dp.addItem( { label: "UILoader",         data:UILoader } );
dp.addItem( { label: "UIComponent",     data:UIComponent } );
var cb:ComboBox = new ComboBox();
cb.move(10,10);
cb.setSize(300,25);
cb.prompt = "Select a component to view its styles";
cb.rowCount = 12;
cb.dataProvider = dp;
cb.addEventListener(Event.CHANGE, showStyleDefinition);
addChild(cb);
var dg:DataGrid = new DataGrid();
dg.setSize(425,300);
dg.move(10,50);
dg.columns = [ new DataGridColumn("StyleName"), new DataGridColumn("DefaultValue") ];
addChild(dg);
function showStyleDefinition(e:Event):void {
    var componentClass:Class = e.target.selectedItem.data as Class;
    var styles:Object = componentClass["getStyleDefinition"].call(this);
    trace(styles.toString());
    var styleData:DataProvider = new DataProvider();
    for(var i:* in styles) {
        trace(i + " : " + styles[i]);
        styleData.addItem( { StyleName:i, DefaultValue:styles[i] } );
    }
    styleData.sortOn("StyleName");
    dg.dataProvider = styleData;
}
| invalidateItem | () | method | 
 public function invalidateItem(item:Object):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Invalidates a specific item renderer.
Parameters
item:Object — The item in the data provider to invalidate.
         
          | 
See also
| invalidateItemAt | () | method | 
 public function invalidateItemAt(index:uint):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Invalidates the renderer for the item at the specified index.
Parameters
index:uint — The index of the item in the data provider to invalidate.
         
          | 
See also
| invalidateList | () | method | 
 public function invalidateList():void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Invalidates the whole list, forcing the list items to be redrawn.
See also
| isItemSelected | () | method | 
 public function isItemSelected(item:Object):Boolean| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Checks whether the specified item is selected in the list.
Parameters
item:Object — The item to check.
		 
          | 
Boolean — This method returns true if the specified item is selected; 
		         otherwise, if the specified item has a value of null or is not
		         included in the list, this method returns false.
         
          | 
| itemToCellRenderer | () | method | 
 public function itemToCellRenderer(item:Object):ICellRenderer| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
 
		 Retrieves the ICellRenderer for a given item object, if there is one. 
		 This method always returns null.
         
         
Parameters
item:Object — The item in the data provider.
         
          | 
ICellRenderer — A value of null.
         
		  | 
import fl.controls.List;
import fl.controls.listClasses.ListData;
import fl.controls.listClasses.CellRenderer;
import fl.events.ListEvent;
var sampleItem1:Object = { label:"John Alpha" };
var sampleItem2:Object = { label:"Mary Bravo" };
var sampleItem3:Object = { label:"Trevor Gamma" };
var sampleItem4:Object = { label:"Susan Delta" };        
var myList:List;
myList = new List();
myList.move(10,10);
myList.addItem(sampleItem1);
myList.addItem(sampleItem2);
myList.addItem(sampleItem3);
myList.addItem(sampleItem4);
myList.addEventListener(ListEvent.ITEM_CLICK, listItemSelected);
addChild(myList);
function listItemSelected(e:ListEvent):void {
    var cr:CellRenderer = myList.itemToCellRenderer(e.item) as CellRenderer;
    var listData:ListData = cr.listData;
    trace("You have selected row: " + listData.row);
}
| itemToLabel | () | method | 
 public function itemToLabel(item:Object):String| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
		 Retrieves the string that the renderer displays for the given data object 
         based on the label properties of the object.  This method
		 is intended to be overwritten in sub-components.  For example, List has
		 a labelField and a labelFunction to derive the
		 label.
		 
         
Parameters
item:Object | 
String | 
| removeAll | () | method | 
 public function removeAll():void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Removes all items from the list.
| removeItem | () | method | 
 public function removeItem(item:Object):Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Removes the specified item from the list.
Parameters
item:Object — The item to be removed.
         
          | 
Object — The item that was removed.
		 
          | 
RangeError  — The item could not be found.
         
          | 
See also
| removeItemAt | () | method | 
 public function removeItemAt(index:uint):Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Removes the item at the specified index position. The indices of items after the specified index location are decremented by 1.
Parameters
index:uint — The index of the item in the data provider to be removed.
         
          | 
Object — The item that was removed.
         
          | 
See also
| replaceItemAt | () | method | 
 public function replaceItemAt(item:Object, index:uint):Object| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Replaces the item at the specified index location with another item. This method modifies the data provider of the List component. If the data provider is shared with other components, the data that is provided to those components is also updated.
Parameters
item:Object — The item to replace the item at the specified index location.
         
          | |
index:uint — The index position of the item to be replaced.
         
          | 
Object — The item that was replaced.
		 
          | 
RangeError  — The specified index is less than 0 or greater than or equal to the length of the data provider.
         
          | 
See also
| scrollToIndex | () | method | 
 public function scrollToIndex(newCaretIndex:int):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Scrolls the list to the item at the specified index. If the index is out of range, the scroll position does not change.
Parameters
newCaretIndex:int — The index location to scroll to.
         
          | 
| scrollToSelected | () | method | 
 public function scrollToSelected():void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
         Scrolls the list to the item at the location indicated by    
		 the current value of the selectedIndex property.
         
         
See also
| setRendererStyle | () | method | 
 public function setRendererStyle(name:String, style:Object, column:uint = 0):void| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Sets a style on the renderers in the list.
Parameters
name:String — The name of the style to be set.
		  | |
style:Object — The value of the style to be set.
         
          | |
column:uint (default = 0) | 
See also
setRendererStyle() method to apply a text format to the list items:
import fl.controls.List;
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = "Comic Sans MS";
var myList:List = new List();
myList.addItem({label:"The quick brown fox..."});
myList.addItem({label:"The quick brown fox..."});
myList.addItem({label:"The quick brown fox..."});
myList.addItem({label:"The quick brown fox..."});
myList.addItem({label:"The quick brown fox..."});
myList.addItem({label:"The quick brown fox..."});
myList.setRendererStyle("textFormat", myTextFormat);
myList.width = 150;
myList.move(10, 10);
addChild(myList);
setRendererStyle() method to apply a text format to the list items:
import fl.controls.DataGrid;
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = "Comic Sans MS";
var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn("column1");
myDataGrid.addColumn("column2");
myDataGrid.addItem({column1:"The quick brown fox...", column2:"...jumped over the lazy dog."});
myDataGrid.addItem({column1:"The quick brown fox...", column2:"...jumped over the lazy dog."});
myDataGrid.addItem({column1:"The quick brown fox...", column2:"...jumped over the lazy dog."});
myDataGrid.addItem({column1:"The quick brown fox...", column2:"...jumped over the lazy dog."});
myDataGrid.addItem({column1:"The quick brown fox...", column2:"...jumped over the lazy dog."});
myDataGrid.addItem({column1:"The quick brown fox...", column2:"...jumped over the lazy dog."});
myDataGrid.setStyle("headerTextFormat", myTextFormat);
myDataGrid.setRendererStyle("textFormat", myTextFormat);
myDataGrid.width = 300;
myDataGrid.move(10, 10);
addChild(myDataGrid);
setRendererStyle() method to apply a text format to the list items:
import fl.controls.TileList;
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = "Comic Sans MS";
myTextFormat.color = 0xFF0000;
myTextFormat.bold = true;
var myTileList:TileList = new TileList();
myTileList.addItem({label:"Image 1", source:"http://www.helpexamples.com/flash/images/image1.jpg"});
myTileList.addItem({label:"Image 2", source:"http://www.helpexamples.com/flash/images/image2.jpg"});
myTileList.addItem({label:"Image 3", source:"http://www.helpexamples.com/flash/images/image3.jpg"});
myTileList.setRendererStyle("textFormat", myTextFormat);
myTileList.columnWidth = 100;
myTileList.rowHeight = 67;
myTileList.columnCount = 3;
myTileList.rowCount = 1;
myTileList.move(10, 10);
addChild(myTileList);
setRendererStyle() method to apply a text format to the list items:
import fl.controls.ComboBox;
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.font = "Comic Sans MS";
var myComboBox:ComboBox = new ComboBox();
myComboBox.addItem({label:"The quick brown fox..."});
myComboBox.addItem({label:"The quick brown fox..."});
myComboBox.addItem({label:"The quick brown fox..."});
myComboBox.addItem({label:"The quick brown fox..."});
myComboBox.addItem({label:"The quick brown fox..."});
myComboBox.addItem({label:"The quick brown fox..."});
myComboBox.textField.setStyle("textFormat", myTextFormat);
myComboBox.dropdown.setRendererStyle("textFormat", myTextFormat);
myComboBox.width = 150;
myComboBox.move(10, 10);
addChild(myComboBox);
| sortItems | () | method | 
 public function sortItems(... sortArgs):*| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Sorts the elements of the current data provider. This method performs a sort based on the Unicode values of the elements. ASCII is a subset of Unicode.
Parameters
... sortArgs — The arguments against which to sort.
		 
          | 
* — The return value depends on whether any parameters are passed to 
		         this method. For more information, see the Array.sort() method. 
		         Note that this method returns 0 when the sortArgs parameter 
                 is set to Array.UNIQUESORT.
         
		  | 
See also
| sortItemsOn | () | method | 
 public function sortItemsOn(field:String, options:Object = null):*| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Sorts the elements of the current data provider by one or more of its fields.
Parameters
field:String — The field on which to sort.
		  | |
options:Object (default = null) — Sort arguments that are used to override the default sort behavior. 
		                Separate two or more arguments with the bitwise OR (|) operator.
		 
          | 
* — The return value depends on whether any parameters are passed to this
		         method. For more information, see the Array.sortOn() method. 
		         Note that this method returns 0 when the sortOption parameter  
                 is set to Array.UNIQUESORT.
         
          | 
See also
sortItemsOn() method:
import fl.controls.List;
import fl.data.DataProvider;
var players:XML = <players>
        <player name="Player Q" avg="0.237" />
        <player name="Player W" avg="0.352" />
        <player name="Player E" avg="0.268" />
        <player name="Player R" avg="0.311" />
        <player name="Player T" avg="0.293" />
        <player name="Player Y" avg="0.33" />
    </players>;
var dp:DataProvider = new DataProvider(players);
var playerList:List = new List();
playerList.labelFunction = myLabelFunction;
playerList.dataProvider = dp;
playerList.sortItemsOn("avg", Array.NUMERIC | Array.DESCENDING);
playerList.move(10, 10);
playerList.setSize(160, 120);
addChild(playerList);
function myLabelFunction(item:Object):String {
    return item.name + " (" + Number(item.avg).toFixed(3) + ")";
}
| change | Event | 
flash.events.Eventflash.events.Event.CHANGE| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when a different item is selected in the list.
TheEvent.CHANGE constant defines the value of the type property of a change event object. 
	
	This event has the following properties:
| Property | Value | 
|---|---|
bubbles | true | 
cancelable | false; there is no default behavior to cancel. | 
currentTarget | The object that is actively processing the Event object with an event listener. | 
target | The object that has had its value modified. 
	The target is not always the object in the display list 
	that registered the event listener. Use the currentTarget 
	property to access the object in the display list that is currently processing the event. | 
| itemClick | Event | 
fl.events.ListEventfl.events.ListEvent.ITEM_CLICK| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when the user clicks an item in the component.
The click event is dispatched before the value
	 of the component is changed. To identify the row and column that were clicked,
	 use the properties of the event object; do not use the selectedIndex 
     and selectedItem properties.
type property of an itemClick 
		 event object. 
		 
         This event has the following properties:
| Property | Value | 
|---|---|
bubbles | false | 
cancelable | true | 
columnIndex | The zero-based index of the column that contains the renderer. | 
currentTarget | The object that is actively processing the event object with an event listener. | 
index | The zero-based index in the DataProvider that contains the renderer. | 
item | A reference to the data that belongs to the renderer. | 
rowIndex | The zero-based index of the row that contains the renderer. | 
target | The object that dispatched the event. The target is 
                   not always the object listening for the event. Use the currentTarget
                  property to access the object that is listening for the event. | 
| itemDoubleClick | Event | 
fl.events.ListEventfl.events.ListEvent.ITEM_DOUBLE_CLICK| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
     Dispatched when the user clicks an item in the component twice in
     rapid succession. Unlike the click event, the doubleClick event is 
	 dispatched after the selectedIndex of the component is 
	 changed.
     
     
type property of an itemDoubleClick 
		 event object. 
		 
		 This event has the following properties:
| Property | Value | 
|---|---|
bubbles | false | 
cancelable | true | 
columnIndex | The zero-based index of the column that contains the renderer. | 
currentTarget | The object that is actively processing the event object with an event listener. | 
index | The zero-based index in the DataProvider that contains the renderer. | 
item | A reference to the data that belongs to the renderer. | 
rowIndex | The zero-based index of the row that contains the renderer. | 
target | The object that dispatched the event. The target is 
                   not always the object listening for the event. Use the currentTarget
		 			property to access the object that is listening for the event. | 
| itemRollOut | Event | 
fl.events.ListEventfl.events.ListEvent.ITEM_ROLL_OUT| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when the user rolls the pointer off of an item in the component.
Defines the value of thetype property of an  
		 itemRollOut event object. 
		 
		 This event has the following properties:
| Property | Value | 
|---|---|
bubbles | false | 
cancelable | false; there is
		          no default behavior to cancel. | 
columnIndex | The zero-based index of the column that contains the renderer. | 
currentTarget | The object that is actively processing the event object with an event listener. | 
index | The zero-based index in the DataProvider that contains the renderer. | 
item | A reference to the data that belongs to the renderer. | 
rowIndex | The zero-based index of the row that contains the renderer. | 
target | The object that dispatched the event. The target is 
                   not always the object listening for the event. Use the currentTarget
		 			property to access the object that is listening for the event. | 
See also
| itemRollOver | Event | 
fl.events.ListEventfl.events.ListEvent.ITEM_ROLL_OVER| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when the user rolls the pointer over an item in the component.
Defines the value of thetype property of an itemRollOver 
		 event object. 
		 
		 This event has the following properties:
| Property | Value | 
|---|---|
bubbles | false | 
cancelable | false; there is 
		          no default behavior to cancel. | 
columnIndex | The zero-based index of the column that contains the renderer. | 
currentTarget | The object that is actively processing the event object with an event listener. | 
index | The zero-based index in the DataProvider that contains the renderer. | 
item | A reference to the data that belongs to the renderer. | 
rowIndex | The zero-based index of the row that contains the renderer. | 
target | The object that dispatched the event. The target is 
                   not always the object listening for the event. Use the currentTarget
		 			property to access the object that is listening for the event. | 
See also
| rollOut | Event | 
flash.events.MouseEventflash.events.MouseEvent.ROLL_OUT| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when the user rolls the pointer off of the component.
Defines the value of thetype property of a rollOut event object. 
	
	This event has the following properties:
| Property | Value | 
|---|---|
altKey | true if the Alt key is active (Windows or Linux). | 
bubbles | false | 
buttonDown | true if the primary mouse button is pressed; false otherwise. | 
cancelable | false; there is no default behavior to cancel. | 
commandKey | true on the Mac if the Command key is active; false if it is inactive. Always false on Windows. | 
controlKey | true if the Ctrl or Control key is active; false if it is inactive. | 
ctrlKey | true on Windows or Linux if the Ctrl key is active. true on Mac if either the Ctrl key or the Command key is active. Otherwise, false. | 
currentTarget | The object that is actively processing the Event object with an event listener. | 
relatedObject | The display list object to which the pointing device now points. | 
localX | The horizontal coordinate at which the event occurred relative to the containing sprite. | 
localY | The vertical coordinate at which the event occurred relative to the containing sprite. | 
shiftKey | true if the Shift key is active; false if it is inactive. | 
stageX | The horizontal coordinate at which the event occurred in global stage coordinates. | 
stageY | The vertical coordinate at which the event occurred in global stage coordinates. | 
target | The InteractiveObject instance under the pointing device. 
	The target is not always the object in the display list 
	that registered the event listener. Use the currentTarget 
	property to access the object in the display list that is currently processing the event. | 
See also
| rollOver | Event | 
flash.events.MouseEventflash.events.MouseEvent.ROLL_OVER| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when the user rolls the pointer over the component.
Defines the value of thetype property of a rollOver event object. 
	
	This event has the following properties:
| Property | Value | 
|---|---|
altKey | true if the Alt key is active (Windows or Linux). | 
bubbles | false | 
buttonDown | true if the primary mouse button is pressed; false otherwise. | 
cancelable | false; there is no default behavior to cancel. | 
commandKey | true on the Mac if the Command key is active; false if it is inactive. Always false on Windows. | 
controlKey | true if the Ctrl or Control key is active; false if it is inactive. | 
ctrlKey | true on Windows or Linux if the Ctrl key is active. true on Mac if either the Ctrl key or the Command key is active. Otherwise, false. | 
currentTarget | The object that is actively processing the Event object with an event listener. | 
relatedObject | The display list object to which the pointing device was pointing. | 
localX | The horizontal coordinate at which the event occurred relative to the containing sprite. | 
localY | The vertical coordinate at which the event occurred relative to the containing sprite. | 
shiftKey | true if the Shift key is active; false if it is inactive. | 
stageX | The horizontal coordinate at which the event occurred in global stage coordinates. | 
stageY | The vertical coordinate at which the event occurred in global stage coordinates. | 
target | The InteractiveObject instance under the pointing device. 
	The target is not always the object in the display list 
	that registered the event listener. Use the currentTarget 
	property to access the object in the display list that is currently processing the event. | 
See also
| scroll | Event | 
fl.events.ScrollEventfl.events.ScrollEvent.SCROLL| Language Version: | ActionScript 3.0 | 
| Product Version: | Flash CS3 | 
| Runtime Versions: | Flash Player 9.0.28.0, AIR 1.0 | 
Dispatched when the user scrolls horizontally or vertically.
Defines the value of thetype property of a scroll
		 event object.
		 
		 This event has the following properties:
| Property | Value | 
|---|---|
bubbles | false | 
cancelable | false; there is no default
		 			behavior to cancel. | 
currentTarget | The object that is actively processing the event object with an event listener. | 
delta | 1; a value that indicates
		          how much scrolling was done.
		 			 | 
direction | vertical; the direction of the
		 		ScrollBar. | 
position | 0; the position of the
		 			Scrollbar thumb after it was moved.  | 
target | The object that dispatched the event. The target is 
                   not always the object listening for the event. Use the currentTarget
		 			property to access the object that is listening for the event. |