Package | com.gestureworks.cml.layouts |
Class | public class FanLayout |
Inheritance | FanLayout ![]() ![]() ![]() |
var topLeftFan:Container = getImageContainer(); topLeftFan.applyLayout(getFanLayout()); addChild(topLeftFan); function getImageContainer():Container { var container:Container = new Container(); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); container.addChild(getImageElement("plane.jpg)); return container; } function getFanLayout(angle:Number = 10, type:String = "topLeftOrigin"):FanLayout { var fanLayout:FanLayout = new FanLayout(); fanLayout.angle = angle; fanLayout.type = type; fanLayout.tween = true; fanLayout.tweenTime = 1500; return fanLayout; } function getImageElement(source:String):Image { var img:Image = new Image(); img.open(source); img.width = 250; img.height = 150; img.resample = true; return img; }
See also
Property | Defined By | ||
---|---|---|---|
![]() | alpha : Number
Specifies the alpha value of the display objects in the layout
| Layout | |
angle : Number
The angle of rotation
| FanLayout | ||
![]() | cacheTransforms : Boolean
Flag indicating the childTransformations are to be cached and reapplied for convenience. | Layout | |
![]() | centerColumn : Boolean
Flag indicating the alignment of the objects' centers with the center of the column. | Layout | |
![]() | centerRow : Boolean
Flag indicating the alignment of the objects' centers with the center of the row. | Layout | |
![]() | childList : ChildList
Returns the object's childList. | CMLObject | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | CMLObject | |
![]() | continuousTransform : Boolean
Flag indicating the application of a transform relative to the current transform. | Layout | |
![]() | easing : *
Specifies the easing equation. | Layout | |
![]() | exclusions : Array
An array of objects to exclude from the layout application
| Layout | |
![]() | id : String
Returns the object's id. | CMLObject | |
![]() | marginX : Number | Layout | |
![]() | marginY : Number
Spacing added to the height of an object
| Layout | |
![]() | onComplete : Function
Function to call on layout complete
| Layout | |
![]() | onCompleteParams : Array
Parameters for onComplete function
| Layout | |
![]() | onUpdate : Function
Function to call on layout update
| Layout | |
![]() | onUpdateParams : Array
Parameters for onUpdate function
| Layout | |
![]() | originX : Number
Starting x coordinate of layout relative to the container
| Layout | |
![]() | _originY : Number = 0 | Layout | |
![]() | originY : Number
Starting y coordinate of layout relative to the container
| Layout | |
rotation : Number [override]
Since this is a rotation dependent layout, override the rotation mutator to prevent conflicts. | FanLayout | ||
![]() | scale : Number
Specifies the scale value of the display objects in the layout
| Layout | |
![]() | spacingX : Number
Horizontal distance between the origins of two objects
| Layout | |
![]() | spacingY : Number
Vertical distance between the origins of two objects
| Layout | |
![]() | state : Array | CMLObject | |
![]() | tween : Boolean
Flag indicating the display objects will animate to their layout positions. | Layout | |
![]() | tweenTime : Number
The time(ms) the display objects will take to move into positions
| Layout | |
![]() | type : String
Specifies a layout subtype
| Layout | |
![]() | useMargins : Boolean
Flag indicating the use of margins or spacing
| Layout |
Method | Defined By | ||
---|---|---|---|
Constructor
| FanLayout | ||
![]() | clone():*
Clone method. | CMLObject | |
dispose():void [override]
Disposal function
| FanLayout | ||
![]() | init():void
Initialization method. | CMLObject | |
![]() | killTween(child:* = null):void
Kills the tweening of the provided child. | Layout | |
layout(container:DisplayObjectContainer):void [override]
Positions and rotates the objects based on the type
| FanLayout | ||
![]() | parseCML(cml:XMLList):XMLList
Internal CML parse method. | CMLObject | |
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | CMLObject | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | CMLObject |
angle | property |
angle:Number
The angle of rotation
The default value is 5
.
public function get angle():Number
public function set angle(value:Number):void
rotation | property |
rotation:Number
[override] Since this is a rotation dependent layout, override the rotation mutator to prevent conflicts.
public function get rotation():Number
public function set rotation(value:Number):void
FanLayout | () | Constructor |
public function FanLayout()
Constructor
dispose | () | method |
override public function dispose():void
Disposal function
layout | () | method |
override public function layout(container:DisplayObjectContainer):void
Positions and rotates the objects based on the type
Parameters
container:DisplayObjectContainer |