The Snowstorm class manages a collection of Snowflake objects, defining their limits, friction, falling speed, and wind.
ActionScript 2.0; Flash Player 6
Property summary
Property | Description |
---|---|
limits:Object |
The limits property of the Snowstorm. |
friction:Number |
The friction property of the Snowstorm. |
fallSpeed:Number |
The fallSpeed property of the Snowstorm. |
flakes:Array |
The flakes property of the Snowstorm. |
wind:Number |
The wind property of the Snowstorm. |
Method summary
Method | Description |
---|---|
addFlake() : Void |
Adds a snowflake to a Snowstorm instance. |
removeFlake() : Object |
Removes a snowflake from a Snowstorm instance. |
var limits:Object = {xmin:0, xmax:this._width, ymin:0, ymax:this._height, zmin:0, zmax:800};
var storm:Snowstorm = new Snowstorm(limits, .03, 5, this);
fallSpeed:Number
- The velocity of the Snowflake.
timeline:MovieClip
- A reference to the MovieClip that contains this particular Snowflake.
depth:
- An integer specifying the depth level where the Snowflake is placed.
Creates an instance of the Snowstorm class.
storm.addFlake();
Nothing.
Adds a snowflake to a Snowstorm instance.
storm.removeFlake();
Nothing.
Removes a snowflake from a Snowstorm instance.
trace (storm.limits.xmin);
trace (storm.limits.xmax);
trace (storm.limits.ymin);
trace (storm.limits.ymax);
trace (storm.limits.zmin);
trace (storm.limits.zmax);
The limits property of the Snowstorm.
trace (storm.friction);
The friction property of the Snowstorm.
trace (storm.fallSpeed);
The fallSpeed property of the Snowstorm.
trace (storm.flakes.length);
The flakes property of the Snowstorm.
trace (storm.wind);
The wind property of the Snowstorm.