AFComponents.com

3D Flow List V. 1.0 API Docs



Properties

Name Type Description
animationStyle Object Defines how items should animate.

Options

  1. easing:String – Type of easing to be used (easeIn, easeOut)
  2. enabled:Boolean
  3. duration:Number – length of animation in milliseconds
  4. type:String – easing type (Strong)

Example:

myFlow.animationStyle = {easing:"easeOut", enabled:true, duration:1500, type:"Strong"}
content Collection Sets component's content.

Options:


1.    path:String – content path (external image, external swf, display object etc)
2.    description:String
3.    data:String – misc. data
4.    type:String – similar to tooltip (image, instance, etc)

Example:

import fl.data.DataProvider;
import com.afcomponents.events.FlowList3DEvent;

function onFlowInit(event:Event) {
    var dp:DataProvider = new DataProvider();
    dp.addItem({path:"pic.jpg", type:"image", description:"text description", data:"http://www.url.com"});
    myFlow.content = dp;
}
myFlow.addEventListener(FlowList3DEvent.INITIALIZE, onFlowInit);
contentXML String Path to content XML file or RSS 2.0 image feed.

XML Sample File
http://www.afcomponents.com/components/3d_carousel_as3/content.xml

RSS Feed Sample
http://api.flickr.com/services/feeds/geo/?id=84716639@N00&lang=en-us&format=rss_200

XML File Format

<content>
    <item>
        <description>Image 1</description>
        <path>image.jpg</path>
        <data>
url.html</data>
        <type>image</type>
    </item>
</content>

Example

myFlow.contentXML = "file.xml";
displayStyle Object Property defines display item scale parameters.

Options


1.    autoSize:Boolean
2.    maintainAspectRatio:Boolean
3.    scaleContent:Boolean

Example

myFlow.displayStyle = {autoSize:false, maintainAspectRatio:true, scaleContent:true};
flowListStyle Object Defines the appearance the 3D Flow List
  1. angleH:Number - the horizontal angle of the 3D Flow List on either side of the selected item.
  2. angleV:Number - the vertical angle of the 3D Flow List
  3. displayedItemCount:Number - the number of items displayed on either side of the selected item (includes selected item)
  4. forceRotationY:Boolean
  5. forceRotationZ:Boolean
  6. itemAlpha:Number - the alpha of the last displayed item, items will fade incrementally
  7. itemDistance:Number - the distance in pixels between each item
  8. itemRotationY:Number - the rotation of each item on the y axis
  9. itemRotationZ:Number - the rotation of each item on the z axis
  10. itemScale:Number - the scale of the last displayed item, other items will scale incrementally
  11. selectedPaddingX:Number - the padding of the selected item on the x axis
  12. selectedPaddingY:Number - the padding of the selected item on the y axis
  13. selectedPaddingZ:Number - the padding of the selected item on the z axis
  14. useFlatAngleV:Boolean
  15. useFlatAngelH:Boolean
Example

myFlow.flowListStyle = {angleH:15, angleV:0, displayedItemCount:5, forceRotationY:true, forceRotationZ:true, itemAlpha:0, itemDistance:100, itemRotationY:60, itemRotationZ:30, itemScale:1, selectedPaddingX:100, selectedPaddingY:100, selectedPaddingZ:100, useFlatAngleV:false, useFlatAngleH:false};
itemDefaultStyle Object Defines the default container style for each item.

Options


1.    cornerRadius:Number
2.    fill:Boolean
3.    fillAlpha:Number
4.    fillColor:Number
5.    stroke:Boolean
6.    strokeAlpha:Number
7.    strokeColor:Number
8.    strokeWidth:Number
9.    horizontalPadding:Number
10.    verticalPadding:Number

Example


myFlow.itemDefaultStyle = {cornerRadius:10, fill:false, fillAlpha:1, fillColor:0x000000, stroke:false, strokeAlpha:1, strokeColor:0x000000, strokeWidth:1, horizontalPadding:0, verticalPadding:0};
itemOverStyle Object Defines the over container style for each item.

Options

1.    cornerRadius:Number
2.    fill:Boolean
3.    fillAlpha:Number
4.    fillColor:Number
5.    stroke:Boolean
6.    strokeAlpha:Number
7.    strokeColor:Number
8.    strokeWidth:Number
9.    horizontalPadding:Number
10.    verticalPadding:Number

Example


myFlow.itemOverStyle = {cornerRadius:7, fill:false, fillAlpha:1, fillColor:0x000000,stroke:true,strokeAlpha:1, strokeColor:0xFF0000, strokeWidth:1, horizontalPadding:0, verticalPadding:0};
itemSelectedStyle Object Defines the selected container style for each item.

Options

1.    cornerRadius:Number
2.    fill:Boolean
3.    fillAlpha:Number
4.    fillColor:Number
5.    stroke:Boolean
6.    strokeAlpha:Number
7.    strokeColor:Number
8.    strokeWidth:Number
9.    horizontalPadding:Number
10.    verticalPadding:Number

Example


myFlow.itemSelectedStyle = {cornerRadius:7, fill:false, fillAlpha:1, fillColor:0x000000, stroke:false, strokeAlpha:1, strokeColor:0x000000, strokeWidth:1, horizontalPadding:0, verticalPadding:0};
previewClip Object Property defines a movie clip which is displayed before items are loaded. The movie clip's class reference should be specified.

Example

myFlow.previewClip = MyClip;
reflectionStyle Object Defines reflection settings.

Options

1. enabled:Boolean
2. alpha:Number
3. clipAlpha:Number
4. distance:Number
5. matrixRatio:Number
6. matrixDropOff:Number

Example

myFlow.reflectionStyle = {enabled:true, alpha:0.5, clipAlpha:0.5, distance:0, matrixRatio:1, matrixDropOff:1.2};
scrollBar Object Property defines an instance of the Flash UIScrollBar component that should be used to control the 3D Flow List

Example

myFlow.scrollBar = myScrollbar;
slideShowStyle Object Defines slide show settings.

Options

1.    enabled:Boolean
2.    loop:Boolean
3.    time:Number

Example:

myFlow.slideShowStyle = {enabled:true, loop:true, time:2000};

Methods

Name Return Type Description
getItemAt( index:Number ) Object Returns content item object specified by the index parameter.

Example


myFlow.getItemAt(3);
getSelectedItem( void ) Object Returns selected item object.

Example

var item:Object = myFlow.getSelectedItem();
trace(item.description);
trace(item.path);
trace(item.data);
getSelectedIndex( void ) Number Returns the selected item index.

Example


myFlow.getSelectedIndex();
getItemIndex( item:Object ) Number Returns index in relation to the entire collection of item specified by the item parameter.

Example

myFlow.getItemIndex(myFlow.getSelectedItem());
selectItem( item:Object ) Void Selects the item specified by the item parameter.

Example

myFlow.selectItem(myFlow.getItemAt(3));
selectItemAt( index:Number ) Void Selects the item at the index parameter.

Example

myFlow.selectItemAt(3);
selectNextItem( void ) Void Selects next item.

Example

myFlow.selectNextItem();
selectPreviousItem( void ) Void Selects previous item.

Example

myFlow.selectPreviousItem();
addItem( item:Object ) Void Adds the item specified by the item parameter to the 3D Flow List.

Example

myFlow.addItem({description:"description", path:"pic.jpg", data:"url.html", type:"image"});
addItemAt( item:Object,
index:Number
)
Void Adds an item to the 3D Flow List at the indicated index.

Example


myFlow.addItemAt({description:"description", path:"pic.jpg", data:"url.html", type:"image"}, 1);
removeItem( item:Object ) Void Removes the item specified by the item parameter.

Example


myFlow.removeItem(myFlow.getItemAt(3));
removeAll( void ) Void Removes all items from the 3D Flow List.

Example

myFlow.removeAll();
addItemEventListener( index:Number,
event:String,
listener:Function
)
Void Adds an event listener to the item indicated by index.

Example

import flash.events.MouseEvent;
import com.afcomponents.events.FlowList3DEvent;

function contentLoad (event:Event) {
    for (var i:Number = 0; i<=myFlow.length-1; i++) {
        myFlow.addItemEventListener (i, MouseEvent.CLICK, itemClick);
    }
}
myFlow.addEventListener(FlowList3DEvent.CONTENT_LOAD_START, contentLoad);

Events

Name Return Value Description
INITIALIZE type
target
Triggered after component initializes.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.INITIALIZE, eventHandler);
ERROR target
type
message
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.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.ERROR, eventHandler);
CHANGE target
type
Triggered once any of the component properties is modified or component state changes.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.CHANGE, eventHandler);
XML_LOAD_START target
type
Triggered when XML loading starts.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.XML_LOAD_START, eventHandler);
XML_LOAD_PROGRESS type
target
bytesLoaded
bytesTotal
Triggered during XML loading to track progress.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:ProgressEvent){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.XML_LOAD_PROGRESS, eventHandler);
XML_LOAD_COMPLETE type
target
Triggered when XML loading is finished.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.XML_LOAD_COMPLETE, eventHandler);
ITEM_LOAD_START type
target
Triggered for each item when it starts loading.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.ITEM_LOAD_START, eventHandler);
ITEM_LOAD_PROGRESS type
target
Triggered for each item during loading to track progress.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:ProgressEvent){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.ITEM_LOAD_PROGRESS, eventHandler);
ITEM_LOAD_COMPLETE type
target
Triggered for each item when loading is finished.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.ITEM_LOAD_COMPLETE, eventHandler);
CONTENT_LOAD_START type
target
Triggered when content loading starts.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.CONTENT_LOAD_START, eventHandler);
CONTENT_LOAD_PROGRESS type
target
Triggered during content loading to track progress.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.CONTENT_LOAD_PROGRESS, eventHandler);
CONTENT_LOAD_COMPLETE type
target
Triggered when content loading is finished.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.CONTENT_LOAD_COMPLETE, eventHandler);
ITEM_SELECTED type
target
Triggered once the item is selected. This event is triggered during the during the slide show mode.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.ITEM_SELECTED, eventHandler);
TRANSITION_START type
target
Triggered when animation starts.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.TRANSITION_START, eventHandler);
TRANSITION_END type
target
Triggered when animation ends.

Example

import com.afcomponents.events.FlowList3DEvent;

function eventHandler(event:Event){
    trace(event.type);
    trace(event.target);
}
myFlow.addEventListener(FlowList3DEvent.TRANSITION_END, eventHandler);



© 2005-2007 advanced flash components