Flow List (AS 3.0) V. 1.2 Documentation
Properties
| Name | Type | Description |
| content | Collection | Defines component's content. Example import fl.data.DataProvider; var dp:DataProvider = new DataProvider(); dp.addItem({path:"image1.jpg"}); dp.addItem({path:"image2.jpg"}); myFlow.content = dp; |
| contentXML | String | Property indicates a path to the XML File. Sample XML file: http://www.afcomponents.com/components/flow_list_as3/content.xml Sample Flickr feed: http://api.flickr.com/services/feeds/photos_public.gne Example myFlow.contentXML = "content.xml"; |
| flowAnimationEasingType | String | Property determines flow animation easing type. Options
Example myFlow.flowAnimationEasingType = "easeIn"; |
| flowAnimationSpeed | Number | Property (1-10) defines flow animation speed. Example myFlow.flowAnimationSpeed = 5; |
| flowAnimationTweenType | String | Property defines flow animation tween type. Options
myFlow.flowAnimationTweenType = “none”; |
| flowFade | Boolean | Defines whether the images which are moved away from the center fade out (true) or not (false). Example myFlow.flowFade = “none”; |
| flowFadeSpace | Number | Property indicates the space for the both sides, in which the items start or end fading. Default value is 150 pixels. Example myFlow.flowFadeSpace = 150; |
| imagePadding | Object | Property defines the horizontal padding around the selected item and the items in the list. Options
myFlow.imagePadding = {item:50, selectedItem:50}; |
| imagePerspective | Object | Property defines image perspective. Options
myFlow.imagePerspective = {vertical: 0.2 , angle: 45 }; |
Methods
| Name | Return Type | Description |
| getItemNum( Number ) | Object | Function returns content item object specified by Number attribute. Example var item:Object = new Object(); item = myFlow.getItemNum(2); trace(item.description); trace(item.path); trace(item.data); trace(item.id); |
| getTotalItems( ) | Number | Function returns total number of items in the content object. Example var items = myFlow.getTotalItems(); trace(items); |
| getSelectedItem( ) | Object | Function returns selected item object. Example var item:Object = new Object(); item = myFlow.getSelectedItem(); trace(item.description); trace(item.path); trace(item.data); trace(item.id); |
| selectItem( Item Object ) |
Void | Function selects item specified by Object attribute. Example var item:Object = new Object(); item = myFlow.getItemNum(2); myFlow.selectItem(item); |
| seletItemNum( Number ) | Void | Function selects item specified by Number attribute. Example myFlow.selectItemNum(2); |
| selectNextItem( ) | Void | Function selects the next item. Example myFlow.selectNextItem(); |
| selectPreviousItem( ) | Void | Function selects the previous item. Example myFlow.selectPreviousItem(); |
| addItem( Item Object ) |
Void | Function adds new item to the content list. Example myFlow.addItem({description:”Item”, path:”image.jpg”,data:”url.html”}); |
| removeItem( Item Object ) |
Void | Function removes item from the content object. Example var item = myFlow.getItemNum(3); myFlow.removeItem(item); |
| getTotalPages( ) | Number | Function returns the number of total pages. Pages are calculated by dividing total number of items by the number of displayed items. Example var pages:Number; pages = myFlow.getTotalPages(); |
Events
| Name | Return Value | Description |
| INITIALIZE | target type |
Triggered after component initializes. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.INITIALIZE, eventHandler); |
| ERROR | target type |
Triggered once error occurs. If there is an error loading an image this event fired. If a wrong parameter is passed to a function this event is fired. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); trace(event.message); } myFlow.addEventListener(FlowListEvent.ERROR, eventHandler); |
| CHANGE | target type property value |
Triggered once any of the component properties is modified or component state changes. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); trace(event.property + " has changed to " + event.value); } myFlow.addEventListener(FlowListEvent.CHANGE, eventHandler); |
| CONTENT_LOAD_START | target type |
Triggered whenever the content (images) start loading. This event helps user track general loading progress. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.CONTENT_LOAD_START, eventHandler); |
| CONTENT_LOAD_PROGRESS | target type itemsTotal itemsLoaded |
Triggered during the content (images) loading. Returns total and loaded number of content elements. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); trace(event.itemsTotal); trace(event.itemsLoaded); } myFlow.addEventListener(FlowListEvent.CONTENT_LOAD_PROGRESS, eventHandler); |
| CONTENT_LOAD_COMPLETE | target type |
Triggered after the content finishes loading. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.CONTENT_LOAD_COMPLETE, eventHandler); |
| XML_LOAD_START | target type |
Triggered when XML starts loading. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.XML_LOAD_START, eventHandler); |
| XML_LOAD_PROGRESS | target type bytesLoaded bytesTotal |
Triggered while XML file is being loaded. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); trace(event.bytesLoaded); trace(event.bytesTotal); } myFlow.addEventListener(FlowListEvent.XML_LOAD_PROGRESS, eventHandler); |
| XML_LOAD_COMPLETE | target type |
Triggered after XML file finishes loading. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.XML_LOAD_COMPLETE, eventHandler); |
| ITEM_SELECTED | target type |
Triggered once an item is selected. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_SELECTED, eventHandler); |
| ITEM_LOAD_START | target type |
Triggered when the item (image) starts loading. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_LOAD_START, eventHandler); |
| ITEM_LOAD_PROGRESS | target type bytesLoaded bytesTotal |
Triggered while the item (image) is being loaded. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); trace(event.bytesLoaded); trace(event.bytesTotal); } myFlow.addEventListener(FlowListEvent.ITEM_LOAD_PROGRESS, eventHandler); |
| ITEM_LOAD_COMPLETE | target type |
Triggered after the item (image) finishes loading. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_LOAD_COMPLETE, eventHandler); |
| ITEM_ON_ROLL_OVER | target type |
Trigged onRollOver button event. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_ON_ROLL_OVER, eventHandler); |
| ITEM_ON_ROLL_OUT | target type |
Trigged onRollOut button event. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_ON_ROLL_OUT, eventHandler); |
| ITEM_ON_PRESS | target type |
Trigged onPress button event. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_ON_PRESS, eventHandler); |
| ITEM_ON_RELEASE | target type |
Trigged onRelease button event. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_ON_RELEASE, eventHandler); |
| ITEM_ON_CLICK | target type |
Trigged onClick button event. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_ON_CLICK, eventHandler); |
| ITEM_ON_DOUBLE_CLICK | type target |
Triggered when an item is double clicked. Example function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.ITEM_ON_DOUBLE_CLICK, eventHandler); |
| TRANSITION_END | type target |
Triggered when the selected image finishes moving to center. Example import com.afcomponents.flowlist.FlowListEvent; function eventHandler(event:Object){ trace(event.type); trace(event.target); } myFlow.addEventListener(FlowListEvent.TRANSITION_END, eventHandler); |
