| Package | com.gestureworks.cml.layouts |
| Class | public class PointLayout |
| Inheritance | PointLayout LayoutFactory ObjectFactory flash.events.EventDispatcher |
var pointContainer:Container = getImageContainer();
pointContainer.x = 500;
pointContainer.y = 20;
addChild(pointContainer);
var pointLayout:PointLayout = new PointLayout();
pointLayout.points = "10,400,200,250,450,350,400,400,523";
pointLayout.tween = true;
pointLayout.tweenTime = 1500;
pointContainer.applyLayout(pointLayout);
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"));
return container;
}
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
| LayoutFactory | |
![]() | cacheTransforms : Boolean
Flag indicating the childTransformations are to be cached and reapplied for convenience. | LayoutFactory | |
![]() | centerColumn : Boolean
Flag indicating the alignment of the objects' centers with the center of the column. | LayoutFactory | |
![]() | centerRow : Boolean
Flag indicating the alignment of the objects' centers with the center of the row. | LayoutFactory | |
![]() | cmlIndex : int
sets the index of cml
| ObjectFactory | |
![]() | continuousTransform : Boolean
Flag indicating the application of a transform relative to the current transform. | LayoutFactory | |
![]() | easing : *
Specifies the easing equation. | LayoutFactory | |
![]() | exclusions : Array
An array of objects to exclude from the layout application
| LayoutFactory | |
![]() | id : String
sets the id
| ObjectFactory | |
![]() | marginX : Number | LayoutFactory | |
![]() | marginY : Number
Spacing added to the height of an object
| LayoutFactory | |
![]() | onComplete : Function
Function to call on layout complete
| LayoutFactory | |
![]() | onUpdate : Function
Function to call on layout update
| LayoutFactory | |
![]() | originX : Number
Starting x coordinate of layout relative to the container
| LayoutFactory | |
![]() | _originY : Number = 0 | LayoutFactory | |
![]() | originY : Number
Starting y coordinate of layout relative to the container
| LayoutFactory | |
| points : String | PointLayout | ||
![]() | propertyStates : Array Deprecated: Please Use state | ObjectFactory | |
![]() | rotation : Number
Specifies the rotation value of the display objects in the layout
| LayoutFactory | |
![]() | scale : Number
Specifies the scale value of the display objects in the layout
| LayoutFactory | |
![]() | spacingX : Number
Horizontal distance between the origins of two objects
| LayoutFactory | |
![]() | spacingY : Number
Vertical distance between the origins of two objects
| LayoutFactory | |
![]() | state : Array
property states array
| ObjectFactory | |
![]() | tween : Boolean
Flag indicating the display objects will animate to their layout positions. | LayoutFactory | |
![]() | tweenTime : Number
The time(ms) the display objects will take to move into positions
| LayoutFactory | |
![]() | type : String
Specifies a layout subtype
| LayoutFactory | |
![]() | useMargins : Boolean
Flag indicating the use of margins or spacing
| LayoutFactory | |
| Method | Defined By | ||
|---|---|---|---|
Constructor
| PointLayout | ||
![]() | clone():*
Returns clone of self
| ObjectFactory | |
dispose():void [override]
Dispsal function
| PointLayout | ||
![]() | killTween(child:* = null):void
Kills the tweening of the provided child. | LayoutFactory | |
layout(container:DisplayObjectContainer):void [override]
Places the display objects at user defined points
| PointLayout | ||
![]() | parseCML(cml:XMLList):XMLList
parses cml file
| ObjectFactory | |
![]() | postparseCML(cml:XMLList):void
postparse method
| ObjectFactory | |
![]() | updateProperties(state:Number = 0):void
update the properties
| ObjectFactory | |
| points | property |
points:String public function get points():String public function set points(value:String):void| PointLayout | () | Constructor |
public function PointLayout()Constructor
| dispose | () | method |
override public function dispose():voidDispsal function
| layout | () | method |
override public function layout(container:DisplayObjectContainer):voidPlaces the display objects at user defined points
Parameters
container:DisplayObjectContainer |