Packagecom.kraftner.justlineon.lineservers
Classpublic class CircularExplosion
InheritanceCircularExplosion Inheritance LineServer Inheritance flash.display.Sprite

This LineServer always starts from the center and moves until it hits the end of the stage or a certain distance from the center. Each new line starts some degree rotated relative to the former line. The distance is constantly decreased/increased so a spiral of lines is formed.

See also

com.kraftner.justlineon.lineservers.CircularImplosion


Public Properties
 PropertyDefined by
 InheritedisAlive : Boolean
true if this LineServer is active
LineServer
Protected Properties
 PropertyDefined by
 Inheritedcounter : uint = 0
Counts the number of Segments already drawn
LineServer
 Inheritedinitial_angle : Number = 0
LineServer
 Inheritedinitial_length : Number = 0
LineServer
 Inheritedinitial_rel_x : Number = 0
LineServer
 Inheritedinitial_rel_y : Number = 0
LineServer
 Inheritedinitial_x : Number = 0
LineServer
 Inheritedinitial_y : Number = 0
LineServer
 Inheritedkillme : Boolean = false
Stores if this Lineserver is active or not.
LineServer
  newSegment : Segment
[read-only] This method defines the new Segment.
CircularExplosion
 Inheritedprev_Segment : Segment
LineServer
Public Methods
 MethodDefined by
  
CircularExplosion(length:Number, angleDegreeMin:Number, angleDegreeMax:Number, away:Number, awaySub:Number, breakOutChance:Number, randomAbort:Number, circleStepWidthDegree:Number)
CircularExplosion
 Inherited
addPainter(painter:Painter):void
Adds a Painter to this LineServer
LineServer
 Inherited
addPointTransformer(pointTransformer:PointTransformer):void
Adds a PointTransformer to this LineServer
LineServer
 Inherited
destroy():void
Contains Code to be executed when this LineServer is destroyed.
LineServer
 Inherited
dump():void
Dumps the content of all Painters in this LineServer to a Bitmap.
LineServer
 Inherited
step():Boolean
This method is called by the main application to trigger a new Segment.
LineServer
Property detail
newSegmentproperty
newSegment:Segment  [read-only]

This method defines the new Segment. It should be overwritten if you subclass your own LineServer.

Implementation
    protected function get newSegment():Segment
Constructor detail
CircularExplosion()constructor
public function CircularExplosion(length:Number, angleDegreeMin:Number, angleDegreeMax:Number, away:Number, awaySub:Number, breakOutChance:Number, randomAbort:Number, circleStepWidthDegree:Number)

Parameters
length:Number — The average length of each line Segment. The actual length of a Segment varies between 60% and 140% of this value.
 
angleDegreeMin:Number — Minimum angle the new Segment turns away from the direction of the first Segment of this line.
 
angleDegreeMax:Number — Maximum angle the new Segment turns away from the direction of the first Segment of this line.
 
away:Number — Initital maximum distance the line can be away from the center. This only applies in connection with the next two parameters.
 
awaySub:Number — Factor which is substracted from away on each new line.
 
breakOutChance:Number — Chance the line ignores the away parameter and moves on. This Chance is represented by a Number between 0 and 1, 0 beeing impossible to break out. This chance isn't a one time decision but is triggered on each Segment of the line again.
 
randomAbort:Number — Chance the line randomly aborts. This Chance is represented by a Number between 0 and 1, 0 meaning the line never randomly aborts and 1 meaning it always aborts. If you set this parameter to 1 the line won't draw at all.
 
circleStepWidthDegree:Number — Number of degrees by which the next line starts offset from the previous angle.