| Package | lunas.containers |
| Class | public class CircleContainer |
| Inheritance | CircleContainer Container CoreComponent Background CoreSprite flash.display.Sprite |
Example :
import flash.display.StageScaleMode ;
import flash.events.KeyboardEvent ;
import flash.ui.Keyboard ;
import graphics.Align;
import lunas.containers.CircleContainer ;
import vegas.colors.Color ;
var container:CircleContainer = new CircleContainer() ;
container.align = Align.CENTER ;
container.childCount = 10 ;
container.radius = 35 ;
container.x = 360 ;
container.y = 230 ;
container.childAngle = 90 ;
container.childOrientation = true ;
var middle:Middle = new Middle() ; // inside the library
addChild( container ) ;
addChild( middle ) ;
var colors:Array =
[
0x7A1D05 , 0xFF0000 , 0xF5532C , 0xECC671 , 0xF3E469 ,
0xCFE478 , 0x72871B , 0x287968 , 0x1E5184 , 0x0E273F
] ;
var n:int = colors.length ;
for (var i:int = 0 ; i < n ; i++ )
{
var sprite:Sprite = new Particle() ;
var co:Color = new Color( sprite ) ;
co.setRGB( colors[i] ) ;
container.addChild( sprite ) ;
}
var keyDown:Function = function( e:KeyboardEvent):void
{
var code:Number = e.keyCode ;
switch( code )
{
case Keyboard.UP :
{
container.childCount ++ ;
container.radius += 10 ;
break ;
}
case Keyboard.DOWN :
{
container.childCount -- ;
container.radius -= 10 ;
break ;
}
case Keyboard.SPACE :
{
var mc:Sprite = container.addChild( new Particle() ) ;
var co:Color = new Color( mc ) ;
co.setRGB( Math.random() * 0xFFFFFF ) ;
break ;
}
case Keyboard.LEFT:
{
container.startAngle -= 10 ;
// container.align = Align.LEFT ;
break ;
}
case Keyboard.RIGHT :
{
container.startAngle += 10 ;
// container.align = Align.RIGHT ;
break ;
}
}
}
stage.addEventListener( KeyboardEvent.KEY_DOWN , keyDown ) ;
stage.scaleMode = StageScaleMode.NO_SCALE ;
| Property | Defined By | ||
|---|---|---|---|
![]() | align : uint
The alignement of the background. | Background | |
![]() | autoSize : Boolean
Indicates if the background is resizing when the stage resize event is invoked. | Background | |
![]() | border : EdgeMetrics
Indicates the thickness, in pixels, of the four edge regions around a visual component. | CoreComponent | |
![]() | bottomLeftRadius : Number
The radius of the bottom-left corner, in pixels. | Background | |
![]() | bottomRightRadius : Number
The radius of the bottom-right corner, in pixels. | Background | |
![]() | bubbles : Boolean = true
Indicates if the events use bubbling when are dispatched. | CoreComponent | |
![]() | builder : Builder
Indicates the Builder reference of this instance. | CoreComponent | |
| childAngle : Number
Indicates the angle value in degrees of the childs in the container. | CircleContainer | ||
| childCount : Number
Indicates the number of childs visible in this container (minimal value is 1). | CircleContainer | ||
| childOrientation : Boolean
Indicates if the childs of the container use a perpendicular tangente direction. | CircleContainer | ||
![]() | componentInspectorSetting : Boolean
Initialize when the Flash component settings are initialized (only in Flash with a compiled component). | CoreComponent | |
![]() | direction : String
Indicates the direction value of the background when the display is in this "full" mode (default value is null). | Background | |
![]() | enabled : Boolean
Indicates the enabled state of the component. | CoreComponent | |
![]() | fill : IFillStyle
Determinates the IFillStyle reference of this display. | Background | |
![]() | gradientMatrix : Matrix
The matrix value to draw the gradient fill. | Background | |
![]() | gradientRotation : Number = 0
The rotation value to draw the gradient fill. | Background | |
![]() | gradientTranslation : Point
The translation vector to draw the gradient fill. | Background | |
![]() | group : Boolean
Indicates with a boolean if this object is grouped. | CoreComponent | |
![]() | groupName : String
Indicates the name of the group of this object. | CoreComponent | |
![]() | h : Number
Determinates the virtual height value of this component. | Background | |
![]() | invert : Boolean
Inverts the z-depth of the childs in the container. | Container | |
![]() | isFull : Boolean
Indicates if the background use full size (use Stage.stageWidth and Stage.stageHeight to resize the background). | Background | |
![]() | layout : Layout
Determinates the layout of this container. | CoreComponent | |
![]() | line : ILineStyle
Determinates the ILineStyle reference of this display. | Background | |
![]() | logger : Logger
Determinates the internal ILogger reference of this Logable object. | CoreSprite | |
![]() | maxHeight : Number
This property defined the maximum height of this display. | Background | |
![]() | maxWidth : Number
Defines the maximum width of this display. | Background | |
![]() | minHeight : Number
This property defined the mimimun height of this display (This value is >= 0). | Background | |
![]() | minWidth : Number
This property defined the mimimun width of this display (This value is >= 0). | Background | |
![]() | numChildren : int [override] [read-only]
Determinates the number of children of this object. | Container | |
| radius : Number
Indicates the radius of the circle container. | CircleContainer | ||
| startAngle : Number
Indicates the value of the start angle to display all childs in the container (in degrees). | CircleContainer | ||
![]() | style : Style
Returns the style of this component. | CoreComponent | |
![]() | topLeftRadius : Number
The radius of the upper-left corner, in pixels. | Background | |
![]() | topRightRadius : Number
The radius of the upper-right corner, in pixels. | Background | |
![]() | useGradientBox : Boolean
Indicates if the IFillStyle of this display use gradient box matrix (only if the IFillStyle is a FillGradientStyle). | Background | |
![]() | w : Number
Determinates the virtual height value of this component. | Background | |
| Property | Defined By | ||
|---|---|---|---|
| _container : Sprite
This Sprite reference defines a container display. | CircleContainer | ||
![]() | _scope : DisplayObjectContainer
The scope of the active display of this container component. | CoreComponent | |
| Method | Defined By | ||
|---|---|---|---|
Creates a new CircleContainer instance. | CircleContainer | ||
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds a child DisplayObject instance to this DisplayObjectContainer instance. | Container | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds a child DisplayObject instance to this DisplayObjectContainer instance. | Container | |
![]() | areInaccessibleObjectsUnderPoint(point:Point):Boolean [override]
Indicates whether the security restrictions would cause any display objects to be omitted from the list returned by calling the DisplayObjectContainer.getObjectsUnderPoint() method with the specified point point. | Container | |
![]() | clear():void
Removes all childs in the container. | Container | |
![]() | contains(child:DisplayObject):Boolean [override]
Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself. | Container | |
![]() | containsAt(index:int):Boolean
Returns true if a child exist in the display list at the specified index value. | Container | |
![]() | doLater():void
Launch an event with a delayed interval. | Background | |
![]() | draw(... arguments):void
Draw the display. | Background | |
![]() | getBuilderRenderer():Class
Returns the Builder constructor use to initialize this component. | CoreComponent | |
![]() | getChildAt(index:int):DisplayObject [override]
Returns the child display object instance that exists at the specified index. | Container | |
![]() | getChildByName(name:String):DisplayObject [override]
Returns the child display object that exists with the specified name. | Container | |
![]() | getChildIndex(child:DisplayObject):int [override]
Returns the index position of a child DisplayObject instance. | Container | |
![]() | getObjectsUnderPoint(point:Point):Array [override]
Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance. | Container | |
![]() | getStyleRenderer():Class
Returns the Style constructor use to initialize this component. | CoreComponent | |
![]() | groupPolicyChanged():void
Invoked when the group property or the groupName property changed. | CoreComponent | |
![]() | hide():void
Hides the component. | CoreComponent | |
![]() | initBackgroundPen(graphic:* = null):IPen
Init the pen to draw the background of this display. | Background | |
![]() | initialize():void
Initialize the component. | CoreComponent | |
![]() | isLocked():Boolean
Returns true if the object is locked. | CoreSprite | |
![]() | isVisible():Boolean
Returns true if the component is visible. | CoreComponent | |
![]() | lock():void [override]
Locks the object. | CoreComponent | |
![]() | move(x:Number, y:Number):void
Moves the component. | CoreComponent | |
![]() | notifyChanged():void
Notify a change in this component. | CoreComponent | |
![]() | notifyEnabled():void
Notify an event when the enabled property is changed. | CoreComponent | |
![]() | notifyResized():void
Notify an event when you resize the component. | Background | |
![]() | refresh(init:*):void
Refresh and initialize the display with a generic object and invoke the "update" method. | Background | |
![]() | registerView(scope:DisplayObjectContainer = null):void
Registers the view of this component. | CoreComponent | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance. | Container | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer. | Container | |
![]() | removeChildsAt(index:int, size:Number):Array
Removes all childs in the model defined for the first item by the specified index value,
this method remove the first and the size - 1 items. | Container | |
![]() | removeRange(from:int, to:int):Array
Removes a range of childs in the container. | Container | |
![]() | resetLock():void
Reset the lock security of the display. | CoreSprite | |
![]() | resize(e:Event = null):void
Resize and update the background. | Background | |
![]() | scope():DisplayObject
Returns the real scope reference of this component. | CoreComponent | |
![]() | setChildIndex(child:DisplayObject, index:int):void [override]
Changes the position of an existing child in the display object container. | Container | |
![]() | setCornerRadius(n:Number):void
Defines all corner radius of the background (upper-left, upper-right, bottom-left and bottom-right). | Background | |
![]() | setSize(w:Number, h:Number):void
Sets the virtual width (w) and height (h) values of the component. | Background | |
![]() | setStyle(... args):void
Sets the style property on the style declaration or object. | CoreComponent | |
![]() | show():void
Shows the component. | CoreComponent | |
![]() | swapChildren(child1:DisplayObject, child2:DisplayObject):void [override]
Swaps the z-order (front-to-back order) of the two specified child objects. | Container | |
![]() | swapChildrenAt(index1:int, index2:int):void [override]
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list. | Container | |
![]() | toArray():Array
Returns the Array representation of all childs in this container. | Container | |
![]() | unlock():void [override]
Unlocks the display. | CoreComponent | |
![]() | unregisterView():void
Unregisters the view of this component. | CoreComponent | |
![]() | update():void [override]
Updates the component. | CoreComponent | |
![]() | viewChanged():void
This method is invoked after the draw() method in the update() method. | Background | |
![]() | viewDestroyed(e:Event = null):void
Invoked when the component is removed. | CoreComponent | |
![]() | viewEnabled():void
Invoked when the enabled property of the component change. | Background | |
![]() | viewResize():void
Invoked when the component is resized. | Background | |
![]() | viewStyleChanged(e:Event = null):void
Invoked when the component Style changed. | CoreComponent | |
| _container | property |
protected var _container:SpriteThis Sprite reference defines a container display.
| childAngle | property |
childAngle:NumberIndicates the angle value in degrees of the childs in the container.
public function get childAngle():Number public function set childAngle(value:Number):void| childCount | property |
childCount:NumberIndicates the number of childs visible in this container (minimal value is 1).
public function get childCount():Number public function set childCount(value:Number):void| childOrientation | property |
childOrientation:BooleanIndicates if the childs of the container use a perpendicular tangente direction. Use the childAngle value to change the angle of the perpendicular childs.
public function get childOrientation():Boolean public function set childOrientation(value:Boolean):void| radius | property |
radius:NumberIndicates the radius of the circle container.
public function get radius():Number public function set radius(value:Number):void| startAngle | property |
startAngle:NumberIndicates the value of the start angle to display all childs in the container (in degrees).
public function get startAngle():Number public function set startAngle(value:Number):void| CircleContainer | () | Constructor |
public function CircleContainer()Creates a new CircleContainer instance.