Packagecv
Classpublic class OrionBitmap
InheritanceOrionBitmap Inheritance Orion Inheritance flash.display.Sprite

OrionBitmap emits particles where ever the specified color is on the parent of the emitter. OrionBitmap takes a snapshot of it's parent when added to the display list. This image is used while it runs.



Public Properties
 PropertyDefined by
 InheritedcacheBlendMode : String = "normal"
Gets or sets the blend mode applied to particles when they are created.
Orion
 InheritedcacheFrames : Array
The storage location for frames that are cached.
Orion
 InheritedcachePixelSnapping : String = "auto"
Gets or sets pixel snapping when frame caching is enabled.
Orion
 InheritedcacheSmoothing : Boolean = false
Gets or sets bitmap smoothing when using frame caching.
Orion
 InheritedcacheTarget : MovieClip
Gets the frame cache movieclip.
Orion
 Inheritedcanvas : Rectangle
The canvas is used to control the boundaries (edge filter) of the particles animating.
Orion
 InheritedcreateEmitters : Array
Triggers the emitters everytime a particle from this emitter is created.
Orion
 Inheriteddebug : Boolean = false
Turns on debug lines to outline the emitter and canvas dimensions
Orion
 InheriteddestroyEmitters : Array
Triggers the emitters everytime a particle from this emitter is destroyed.
Orion
 InheritededgeFilter : IFilter
Gets or sets the edge filter used by the emitter to determine what the particles will do when they hit the edge.
Orion
 InheritedeffectFilters : Array
Gets the filters being applied by the emitter.
Orion
 Inheritedheight : Number
Gets or sets the height of the emitter.
Orion
  isRandom : Boolean = false
If true, it ignores speedX and speedY and randomly chooses a point within the emitter.
OrionBitmap
 Inheritedoutput : IOutput
Gets or sets the output class used.
Orion
 Inheritedparticles : Array
The array of all the particles in this instance of Orion
Orion
 InheritedparticlesVisible : Boolean = true
As the particles are updated, this will toggle visibility on or off.
Orion
 Inheritedpaused : Boolean
Gets or sets the paused property
Orion
 Inheritedsettings : Object
The settings object controls all configuration.
Orion
  speedX : Number = 6
The X speed that the emitter scans the bitmap and adds particles.
OrionBitmap
  speedY : Number = 2
The Y speed that the emitter scans the bitmap and adds particles.
OrionBitmap
 InheritedspriteClass : Class
Gets or sets the specific library linkId (class reference)
Orion
  target : DisplayObject
The display object to use as a reference for the bitmapdata.
OrionBitmap
  targetColor : Number
The target color to attach particles to within the bitmap.
OrionBitmap
 Inheritedtime : int
[static] Current Time
Orion
 InheritedupdateEmitters : Array
Triggers the emitters everytime a particle from this emitter gets updated.
Orion
 InheriteduseCacheAsBitmap : Boolean = false
Gets or sets whether bitmap caching is enabled on particles used within this emitter.
Orion
 InheriteduseFrameCaching : Boolean
Gets or sets whether frame caching will be enabled.
Orion
 Inheritedwidth : Number
Gets or sets the width of the emitter.
Orion
 Inheritedx : Number
Gets or sets the x position of the emitter.
Orion
 Inheritedy : Number
Gets or sets the y position of the emitter.
Orion
Protected Properties
 PropertyDefined by
  startY : Number = 0
OrionBitmap
Public Methods
 MethodDefined by
  
OrionBitmap(spriteClass:Class = null, output:IOutput = null, config:Object = null, useFrameCaching:Boolean = false)
The constructor allows a few common settings to be specified during construction.
OrionBitmap
 Inherited
applyPreset(config:Object = null, reset:Boolean = false):void
Orion
 Inherited
emit(point:Point = null):void
Causes the emitter to add particles.
Orion
 Inherited
interpolateColor(fromColor:uint, toColor:uint, progress:Number):uint
[static] Finds a color that's between the two numbers given.
Orion
 Inherited
interpolateTransform(fromColor:ColorTransform, toColor:ColorTransform, progress:Number):ColorTransform
[static] Finds a ColorTransform that's between the two ColorTransforms given.
Orion
 Inherited
killGarbage(e:TimerEvent = null):void
This will run ever 2 seconds and remove any inactive particles from memory.
Orion
 Inherited
pause():void
Pauses the particle system
Orion
 Inherited
play():void
Resumes or plays the particle system
Orion
 Inherited
Removes all particles from the emitter.
Orion
 Inherited
removeItem(array:Array, item:*):Boolean
[static] Removes a specified item from the array.
Orion
  
render(e:Event = null):void
Updates all the particles and positions, updates the output class as well.
OrionBitmap
 Inherited
rotateCoord(x:Number, y:Number, sin:Number, cos:Number):Point
[static] Takes a given coordinate and rotates it in a 2D space.
Orion
 Inherited
update(emitter:Orion):void
This acts as a fake output update function for use by the Update and Destroy emitters.
Orion
  
updateBitmap():void
Updates the bitmapdata of the target display object if it has changed.
OrionBitmap
Protected Methods
 MethodDefined by
 Inherited
addParticle(pt:Point = null):void
Adds a new particle to the system.
Orion
 Inherited
cacheFramesOf(mc:MovieClip):void
If it's a movieclip, cache it's frames.
Orion
 Inherited
getColorTransform(p:ParticleVO, targetColor:uint):ColorTransform
Used to get a colortransform object for a specific particle.
Orion
  
getCoordinate():Point
Returns a coordinate it's designated position.
OrionBitmap
 Inherited
Returns a new particle
Orion
 Inherited
Checks the recycle bin if a suitable particle can be re-used.
Orion
 Inherited
gotoAndStopCached(d:DisplayObject, frame:int):void
Sets a given particle to a specific frame in the movieclip, from the frame cached in memory.
Orion
 Inherited
randomRange(min:Number, max:Number):Number
[static] Return a random number between a range of numbers
Orion
 Inherited
Removes a particle and stores the reference to the particle inside of the recyclebin dictionary.
Orion
 Inherited
removeParticle(p:ParticleVO, doArray:Boolean = true):void
Removes a particle.
Orion
 Inherited
Updates the specific particle based on the filters assigned to the emitter.
Orion
 Inherited
Resets the particle and initializes it for use.
Orion
  
stageHandler(event:Event):void
OrionBitmap
  
Update the intersecting rectangle.
OrionBitmap
Events
 EventSummaryDefined by
 Inherited This event is dispatched each time Orion renders the particles.Orion
 Inherited This event is dispatched each time Orion is resized.Orion
Public Constants
 ConstantDefined by
 InheritedDEG2RAD : Number = 0.017453292519943295
[static] Stored decimal value for conversion
Orion
 InheritedVERSION : String = "1.0.0"
[static] The current version of Orion.
Orion
Property detail
isRandomproperty
public var isRandom:Boolean = false

If true, it ignores speedX and speedY and randomly chooses a point within the emitter.

The default value is false.

speedXproperty 
public var speedX:Number = 6

The X speed that the emitter scans the bitmap and adds particles.

The default value is 6.

See also

speedYproperty 
public var speedY:Number = 2

The Y speed that the emitter scans the bitmap and adds particles.

The default value is 2.

See also

startYproperty 
protected var startY:Number = 0
targetproperty 
target:DisplayObject  [read-write]

The display object to use as a reference for the bitmapdata. This is the object that is actually drawn from and the dimensions are grabbed from. If no target is specified, then it will default to the parent of the emitter.

The default value is this.parent.

Implementation
    public function get target():DisplayObject
    public function set target(value:DisplayObject):void
targetColorproperty 
targetColor:Number  [read-write]

The target color to attach particles to within the bitmap.

The default value is 0xFFFFFFFF.

Implementation
    public function get targetColor():Number
    public function set targetColor(value:Number):void
Constructor detail
OrionBitmap()constructor
public function OrionBitmap(spriteClass:Class = null, output:IOutput = null, config:Object = null, useFrameCaching:Boolean = false)

The constructor allows a few common settings to be specified during construction. Options such as the output class or any configuration settings.

Parameters
spriteClass:Class (default = null) — This is the linkage class of the item you have exported from the library.
 
output:IOutput (default = null) — Here you can specify which output class you'd like to use. If you don't want to use one, just leave this as null
 
config:Object (default = null) — Here you can pass in a configuration object. A configuration object is generated by a preset or you can write one by hand. Each configuration object can contain an effectFilters array, an edgeFilter object, and a settings object. The settings object can contain all the same properties that modifying the settings property directly allows.
 
useFrameCaching:Boolean (default = false) — Frame caching is useful for particles that have a lot of glow filters or native Flash filters applied. Turning on frame caching will cause Orion to take a snapshot of each frame of the particle and turn it into a Bitmap and use the Bitmap instead. This can greatly increase performance for complicated particles.
Method detail
getCoordinate()method
protected override function getCoordinate():Point

Returns a coordinate it's designated position.

Returns
Point — Returns a coordinate at the emitters x,y position or within it.
render()method 
public override function render(e:Event = null):void

Updates all the particles and positions, updates the output class as well.

Parameters
e:Event (default = null) — The event dispatched.
stageHandler()method 
protected override function stageHandler(event:Event):void

Parameters
event:Event
updateBitmap()method 
public function updateBitmap():void

Updates the bitmapdata of the target display object if it has changed.

updateIntersection()method 
protected function updateIntersection():void

Update the intersecting rectangle. Only emit particles within the emitter and within the bounds of the image.