Media List V. 1.0 API Docs
Properties
| Name | Type | Description |
| borderStyle | Object | Defines the style of the border surrounding the list.
|
| content | Collection | Collection of items to display in the list.
|
| contentXML | String | Path to an XML or RSS file containing items to display in the list. Example XML http://www.afcomponents.com/components/media_list/content.xml Example RSS http://my.videobloom.com/platform/includes/videoBloomRSS.php?mId=83&cId=175 http://weirdamerica.blip.tv/?skin=rss |
| customActiveIconPath | String | Path (linkage identifier) to a custom active icon. |
| descriptionTextStyle | Object | Defines description text format.
var myTextFormat = new TextFormat(); myTextFormat.font = "Arial"; myTextFormat.size = 10; myTextFormat.color = 0xFF0000; myList.descriptionTextStyle.textFormat = myTextFormat; **Note: This field does not currently support HTML. When parsing RSS feeds with an HTML description (VideoBloom, Google Video, Blip TV, etc), it is recommended that you turn the description off (showDescription:false). |
| itemDefaultStyle | Object | Defines the default style of an item in the list.
var gradientDefault:Object = new Object; gradientDefault.fillType = "linear"; gradientDefault.colors = [0x99FF99, 0xFFFFFF]; gradientDefault.alphas = [85, 100]; gradientDefault.ratios = [0, 255]; gradientDefault.matrix = new flash.geom.Matrix(); gradientDefault.matrix.createGradientBox(100, 50, (Math.PI * 3 / 2), 0, 0); myList.itemSelectedStyle.fillGradient = gradientDefault; |
| itemHeight | Number | Determines the height of each item in the list. |
| itemMargin | Object | Defines margins around each item.
|
| itemOverStyle | Object | Defines the style of an item in the list when the mouse is over it.
var gradientOver:Object = new Object; gradientOver.fillType = "linear"; gradientOver.colors = [0x99FF99, 0xFFFFFF]; gradientOver.alphas = [85, 100]; gradientOver.ratios = [0, 255]; gradientOver.matrix = new flash.geom.Matrix(); gradientOver.matrix.createGradientBox(100, 50, (Math.PI * 3 / 2), 0, 0); myList.itemSelectedStyle.fillGradient = gradientOver; |
| itemPadding | Object | Defines the padding inside each item.
|
| itemSelectedStyle | Object | Defines the style of an item in the list when it has been clicked.
var gradientSelected:Object = new Object; gradientSelected.fillType = "linear"; gradientSelected.colors = [0x99FF99, 0xFFFFFF]; gradientSelected.alphas = [85, 100]; gradientSelected.ratios = [0, 255]; gradientSelected.matrix = new flash.geom.Matrix(); gradientSelected.matrix.createGradientBox(100, 50, (Math.PI * 3 / 2), 0, 0); myList.itemSelectedStyle.fillGradient = gradientSelected; |
| raytraceOverlay | Boolean | Determines whether to display raytrace overlay (true) or not (false). |
| thumbnailContainerStyle | Object | Determines the properties of each item's thumbnail.
|
| titleTextStyle | Object | Defines title text format.
var myTextFormat = new TextFormat(); myTextFormat.font = "Arial"; myTextFormat.size = 10; myTextFormat.color = 0xFF0000; myList.titleTextStyle.textFormat = myTextFormat; |
| UIScrollBar | String | Path to a UIScrollBar component instance. Note: you need to target the scrollbar from your Media List and size it yourself. It will not work the other way around (targeting your Media List from _targetInstanceName). |
Methods
| Name | Return Type | Description |
| getItemNum( item:Number ) | Object | Returns content item object specified by Number attribute. Example var item:Object = myList.getItemNum(2); trace(item.id); trace(item.title); trace(item.description); trace(item.thumbnailPath); trace(item.data); |
| getTotalItems( void ) | Number | Returns the total number of items in the list. Example var totalItems:Number = myList.getTotalItems(); |
| getSelectedItem( void ) | Object | Returns the selected item object. Example var item:Object = myList.getSelectedItem(); trace(item.id); trace(item.title); trace(item.description); trace(item.thumbnailPath); trace(item.data) |
| selectItem( item:Object ) | Void | Selects the specified item. Example var item:Object = myList.getItemNum(2); myList.selectItem(item); |
| selectItemNum( item:Number ) | Void | Selects the specified item. Example myList.selectItemNum(2); |
| selectNextItem( void ) | Void | Selects the next item in the list. If no item is selected or the last item is selected, this will select the first item in the list. Example myList.selectNextItem(); |
| selectPreviousItem( void ) | Void | Selects the item previous to the current item. If no item is selected, or the first item is selected, this will select the last item. Example myList.selectPreviousItem |
| addItem( void ) | Void | Adds an item to the list. Example myList.addItem({title: "Test Item",description: "This is a test item.",thumbnailPath: "my_thumb.jpg", data:"some_video.flv"}); |
| removeItem( void ) | Void | Removes the specified item from the list. Example var item:Object = myList.getItemNum(3); myList.removeItem(item); |
Events
| Name | Return Value | Description |
| INITIALIZE | target type |
Triggered after the component initializes. Example myList.addEventListener("INITIALIZE", this); function INITIALIZE(evnt:Object) { trace(evnt.type); } |
| ERROR | target type message |
Triggered if an error occurs. Example myList.addEventListener("ERROR", this); function ERROR(evnt:Object) { trace(evnt.message); } |
| CONTENT_LOAD_START | target type |
Triggered when content loading starts. Example myList.addEventListener("CONTENT_LOAD_START", this); function CONTENT_LOAD_START(evnt:Object) { trace(evnt.type); } |
| CONTENT_LOAD_PROGRESS | target type itemsLoaded itemsTotal |
Triggered during content loading. Example myList.addEventListener("CONTENT_LOAD_PROGRESS", this); function CONTENT_LOAD_PROGRESS(evnt:Object) { trace(evnt.type); trace(evnt.itemsLoaded); trace(evnt.itemsTotal); } |
| CONTENT_LOAD_COMPLETE | target type |
Triggered when content loading is complete. Example myList.addEventListener("CONTENT_LOAD_COMPLETE", this); function CONTENT_LOAD_COMPLETE(evnt:Object) { trace(evnt.type); } |
| XML_LOAD_START | target type |
Triggered when XML starts loading. Example myList.addEventListener("XML_LOAD_START", this); function XML_LOAD_START(evnt:Object) { trace(evnt.type); } |
| XML_LOAD_PROGRESS | target type bytesLoaded bytesTotal |
Triggered during XML loading. Example myList.addEventListener("XML_LOAD_PROGRESS", this); function XML_LOAD_PROGRESS(evnt:Object) { trace(evnt.type); trace(evnt.bytesLoaded); trace(evnt.bytesTotal); } |
| XML_LOAD_COMPLETE | target type |
Triggered when XML loading is complete. Example myList.addEventListener("XML_LOAD_COMPLETE", this); function XML_LOAD_COMPLETE(evnt:Object) { trace(evnt.type); } |
| ITEM_LOAD_START | target type |
Triggered when item starts loading. Example myList.addEventListener("ITEM_LOAD_START", this); function ITEM_LOAD_START(evnt:Object) { trace(evnt.type); } |
| ITEM_LOAD_PROGRESS | target type bytesLoaded bytesTotal |
Triggered during item loading. Example myList.addEventListener("ITEM_LOAD_PROGRESS", this); function ITEM_LOAD_PROGRESS(evnt:Object) { trace(evnt.type); trace(evnt.bytesLoaded); trace(evnt.bytesTotal); } |
| ITEM_LOAD_COMPLETE | target type |
Triggered when item loading is complete. Example myList.addEventListener("ITEM_LOAD_COMPLETE", this); function ITEM_LOAD_COMPLETE(evnt:Object) { trace(evnt.type); } |
| ITEM_ON_ROLL_OVER | target type |
Triggered when the mouse rolls over an item in the list. Example myList.addEventListener("ITEM_ON_ROLL_OVER", this); function ITEM_ON_ROLL_OVER(evnt:Object) { trace(evnt.type); } |
| ITEM_ON_ROLL_OUT | target type |
Triggered when mouse rolls out of an item in the list. Example myList.addEventListener("ITEM_ON_ROLL_OUT", this); function ITEM_ON_ROLL_OUT(evnt:Object) { trace(evnt.target); } |
| ITEM_ON_RELEASE | target type |
Triggered when the mouse is released on an item in the list. Example myList.addEventListener("ITEM_ON_RELEASE", this); function ITEM_ON_RELEASE(evnt:Object) { trace(evnt.target); } |
| ITEM_ON_RELEASE_OUTSIDE | target type |
Triggered when mouse is pressed on an item in the list and then released outside that item. Example myList.addEventListener("ITEM_ON_RELEASE_OUTSIDE", this); function ITEM_ON_RELEASE_OUTSIDE(evnt:Object) { trace(evnt.target); } |
| ITEM_ON_PRESS | target type |
Triggered when the mouse is pressed on an item in the list. Example myList.addEventListener("ITEM_ON_PRESS", this); function ITEM_ON_PRESS(evnt:Object) { trace(evnt.target); } |