Packageat.containers
Classpublic class Base3DContainer
InheritanceBase3DContainer Inheritance mx.core.UIComponent
SubclassesSiteMap3DContainer

This component lays out DisplayObjects added as children of the component into different orentations based off of the layoutMode.

This component should not be used directly, but instead as a base for extension or encapsulation inside of a bigger component.

See also

at.core.Base3DContainerLayoutModes


Public Properties
 PropertyDefined by
  debugMode : Boolean = false
Outputs useful information for debugging this component for developers when true.
Base3DContainer
  depth : Number
The distance away from the selected item in the stack along the z-axis.
Base3DContainer
  easingFunction : String = "easeOutExpo"
Tweening function to use for moving through the component.
Base3DContainer
  horizontalGap : Number
The distance between each item.
Base3DContainer
  layoutMode : String
The layout mode for the component.
Base3DContainer
  maxItemHeight : Number = 0
The largest height of any of the children in this component.
Base3DContainer
  maxItemWidth : Number = 0
The largest width of any of the children in this component.
Base3DContainer
  offset : Number
The distance in pixels to the left and right from the center point of the selected item in the stack.
Base3DContainer
  rotationAngle : Number
The rotation angle on the y-axis for each unselected item in the stack.
Base3DContainer
  selectedChild : DisplayObject
The currently selected child in the component.
Base3DContainer
  selectedIndex : int
The index of the selected item in the component.
Base3DContainer
  tweenDuration : Number
The amount of time it takes to move all of the items in the stack into position, in milliseconds.
Base3DContainer
  verticalOffset : Number
The distance in pixels the "camera" needs to move along it's y-axis to appear to be above or below the content.
Base3DContainer
Protected Properties
 PropertyDefined by
  items : Array
All of the visible items in the stack in the order they were created.
Base3DContainer
  previousIndex : int = -1
The previously selected index.
Base3DContainer
  radius : Number = 0
The radius of the carousel when the layoutMode is set to carousel.
Base3DContainer
Public Methods
 MethodDefined by
  
Constructor.
Base3DContainer
  
getChildren():Array
The array of children as they were added to the component.
Base3DContainer
  
sortChildren():void
Changes the indicies of all of the children of this component based on the z depth.
Base3DContainer
Protected Methods
 MethodDefined by
  
addedToStageHandler(e:Event):void
Handles the added to stage event.
Base3DContainer
  
itemSelected():void
Runs after the tweens from the positionItems() to set all of the non-selected components' mouseChildren property to false.
Base3DContainer
  
Lays out all of the items in a circular fashion with each of the items facing in one direction towards the viewer.
Base3DContainer
  
Updates the positions of all of the items in the component if layoutMode is set to imageStack.
Base3DContainer
  
Updates the positions of all of the items in component based on the layoutMode.
Base3DContainer
  
resizeHandler(e:ResizeEvent):void
Repositions the items in the component based on changed component dimensions.
Base3DContainer
  
updateCompleteHandler(e:FlexEvent):void
Sets up the 3D projection when the component has finished loading.
Base3DContainer
  
Base3DContainer
Property detail
debugModeproperty
public var debugMode:Boolean = false

Outputs useful information for debugging this component for developers when true.

The output is typically in the form of trace statements and Alerts.

The default value is false.

depthproperty 
depth:Number  [read-write]

The distance away from the selected item in the stack along the z-axis.

The default value is 300.

Implementation
    public function get depth():Number
    public function set depth(value:Number):void
easingFunctionproperty 
public var easingFunction:String = "easeOutExpo"

Tweening function to use for moving through the component.

Some of these options are not recommended, but provide alternate methods to the standard motion.

The default value is "easeOutExpo".

horizontalGapproperty 
horizontalGap:Number  [read-write]

The distance between each item.

The default value is 100.

Implementation
    public function get horizontalGap():Number
    public function set horizontalGap(value:Number):void
itemsproperty 
protected var items:Array

All of the visible items in the stack in the order they were created.

Due to the fact that the child index will change to display the items on top of one another visually, this is the list of all items as they were added.

This array can be returned by calling getChildren().

The default value is [].

See also

layoutModeproperty 
layoutMode:String  [read-write]

The layout mode for the component.

The list of styles can be found in the Base3DContainerLayoutModes.

The default value is "carousel".

Implementation
    public function get layoutMode():String
    public function set layoutMode(value:String):void

See also

maxItemHeightproperty 
public var maxItemHeight:Number = 0

The largest height of any of the children in this component.

The default value is 0.

maxItemWidthproperty 
public var maxItemWidth:Number = 0

The largest width of any of the children in this component.

The default value is 0.

offsetproperty 
offset:Number  [read-write]

The distance in pixels to the left and right from the center point of the selected item in the stack.

This number may need to be higher based on the imageWidth setting, as it depends on how wide each item is.

The default value is 160.

Implementation
    public function get offset():Number
    public function set offset(value:Number):void
previousIndexproperty 
protected var previousIndex:int = -1

The previously selected index.

The default value is -1.

radiusproperty 
protected var radius:Number = 0

The radius of the carousel when the layoutMode is set to carousel.

This value is automatically set based on the width of the objects loaded into the component.

The default value is 0.

rotationAngleproperty 
rotationAngle:Number  [read-write]

The rotation angle on the y-axis for each unselected item in the stack.

This setting only applies when the layout mode is set to imageStack.

The default value is 65.

Implementation
    public function get rotationAngle():Number
    public function set rotationAngle(value:Number):void
selectedChildproperty 
selectedChild:DisplayObject  [read-write]

The currently selected child in the component.

The default value is null.

This property can be used as the source for data binding.

Implementation
    public function get selectedChild():DisplayObject
    public function set selectedChild(value:DisplayObject):void
selectedIndexproperty 
selectedIndex:int  [read-write]

The index of the selected item in the component.

The default value is -1.

This property can be used as the source for data binding.

Implementation
    public function get selectedIndex():int
    public function set selectedIndex(value:int):void
tweenDurationproperty 
tweenDuration:Number  [read-write]

The amount of time it takes to move all of the items in the stack into position, in milliseconds.

The default value is 325.

Implementation
    public function get tweenDuration():Number
    public function set tweenDuration(value:Number):void
verticalOffsetproperty 
verticalOffset:Number  [read-write]

The distance in pixels the "camera" needs to move along it's y-axis to appear to be above or below the content.

This setting subtracts this value from the y position of the items in the container, and adds the value to the projectionCenter of the PerspectiveProjection.

The default value is 0.

Implementation
    public function get verticalOffset():Number
    public function set verticalOffset(value:Number):void
Constructor detail
Base3DContainer()constructor
public function Base3DContainer()

Constructor.

Method detail
addedToStageHandler()method
protected function addedToStageHandler(e:Event):void

Handles the added to stage event.

Parameters
e:Event — The event
getChildren()method 
public function getChildren():Array

The array of children as they were added to the component.

This returns items array.

Returns
Array — The array of DisplayObjects

See also

itemSelected()method 
protected function itemSelected():void

Runs after the tweens from the positionItems() to set all of the non-selected components' mouseChildren property to false.

layoutCarousel()method 
protected function layoutCarousel():void

Lays out all of the items in a circular fashion with each of the items facing in one direction towards the viewer.

Updates the positions of all of the items in the component if layoutMode is set to carousel.

layoutImageStack()method 
protected function layoutImageStack():void

Updates the positions of all of the items in the component if layoutMode is set to imageStack.

positionItems()method 
protected function positionItems():void

Updates the positions of all of the items in component based on the layoutMode.

resizeHandler()method 
protected function resizeHandler(e:ResizeEvent):void

Repositions the items in the component based on changed component dimensions.

Parameters
e:ResizeEvent — The resize event
sortChildren()method 
public function sortChildren():void

Changes the indicies of all of the children of this component based on the z depth.

updateCompleteHandler()method 
protected function updateCompleteHandler(e:FlexEvent):void

Sets up the 3D projection when the component has finished loading.

Parameters
e:FlexEvent — The updateComplete event.
updatePerspective()method 
protected function updatePerspective():void