Packagenet.eidiot.particles
Classpublic class SnowSystem
InheritanceSnowSystem Inheritance flash.display.Sprite

A snow system as a Sprite.


Example
The simplest way to use it:
addChild(new SnowSystem(640, 480));



Public Properties
 PropertyDefined by
  isStop : Boolean
[read-only] Is the sonw stoped.
SnowSystem
Public Methods
 MethodDefined by
  
SnowSystem(showWidth:Number, showHeight:Number, skinClass:Class = null, autoStart:Boolean = true)
Create a snow system.
SnowSystem
  
setAlpha(min:Number, max:Number):void
Set the alpha range of snowflakes.
SnowSystem
  
setLandHeight(landHeight:Number):void
Set the height of the land where snowflakes disappear.
SnowSystem
  
setMargin(margin:Number):void
Set the margin where snowflakes spawned outside the show scope.
SnowSystem
  
setSize(min:Number, max:Number):void
Set the size range of snowflakes.
SnowSystem
  
setSkin(skinClass:Class):void
Set the skin class.
SnowSystem
  
setSpawnRate(spawnRate:Number):void
Set how many snowflakes spawned per-frame.
SnowSystem
  
setXV(min:Number, max:Number):void
Set the x velocity range of snowflakes.
SnowSystem
  
setYV(min:Number, max:Number):void
Set the y velocity range of snowflakes.
SnowSystem
  
start(clear:Boolean = false):void
Start snow.
SnowSystem
  
stop(clear:Boolean = false):void
Stop snow.
SnowSystem
Events
 EventSummaryDefined by
   Dispatched when the snow is stoped and all the snowflakes are cleared.SnowSystem
Public Constants
 ConstantDefined by
  CLEAR_COMPLETE : String = "clearComplete"
[static] Constant for the clearComplete event.
SnowSystem
Property detail
isStopproperty
isStop:Boolean  [read-only]

Is the sonw stoped.

Implementation
    public function get isStop():Boolean
Constructor detail
SnowSystem()constructor
public function SnowSystem(showWidth:Number, showHeight:Number, skinClass:Class = null, autoStart:Boolean = true)

Create a snow system.

Parameters
showWidth:Number — The width of the system to show.
 
showHeight:Number — The height of the system to show.
 
skinClass:Class (default = null) — The class to create a snowflake.
 
autoStart:Boolean (default = true) — If start snow immediately.
Method detail
setAlpha()method
public function setAlpha(min:Number, max:Number):void

Set the alpha range of snowflakes.

Parameters
min:Number — The minimum alpha of snowflakes.
 
max:Number — The maximum alpha of snowflakes.
setLandHeight()method 
public function setLandHeight(landHeight:Number):void

Set the height of the land where snowflakes disappear.

Parameters
landHeight:Number — The height of the land.
setMargin()method 
public function setMargin(margin:Number):void

Set the margin where snowflakes spawned outside the show scope.

Parameters
margin:Number — Where snowflakes spawned outside the show scope.
setSize()method 
public function setSize(min:Number, max:Number):void

Set the size range of snowflakes.

Parameters
min:Number — The minimum size of snowflakes.
 
max:Number — The maximum size of snowflakes.
setSkin()method 
public function setSkin(skinClass:Class):void

Set the skin class.

Parameters
skinClass:Class — The class to create a snowflake.
setSpawnRate()method 
public function setSpawnRate(spawnRate:Number):void

Set how many snowflakes spawned per-frame. Can be noninteger and be less than 1.

Parameters
spawnRate:Number — How many snowflakes spawned per-frame.
setXV()method 
public function setXV(min:Number, max:Number):void

Set the x velocity range of snowflakes.

Parameters
min:Number — The minimum x velocity of snowflakes.
 
max:Number — The maximum x velocity of snowflakes.
setYV()method 
public function setYV(min:Number, max:Number):void

Set the y velocity range of snowflakes.

Parameters
min:Number — The minimum y velocity of snowflakes.
 
max:Number — The maximum y velocity of snowflakes.
start()method 
public function start(clear:Boolean = false):void

Start snow.

Parameters
clear:Boolean (default = false) — If clear all the snowflakes before start.
stop()method 
public function stop(clear:Boolean = false):void

Stop snow.

Parameters
clear:Boolean (default = false) — If clear all the snowflakes after stop.
Event detail
clearCompleteevent 
Event object type: flash.events.Event

Dispatched when the snow is stoped and all the snowflakes are cleared.

Constant detail
CLEAR_COMPLETEconstant
public static const CLEAR_COMPLETE:String = "clearComplete"

Constant for the clearComplete event.