Snowstorm (com.robertpenner.profmx.snow.Snowstorm)

com.robertpenner.profmx.snow.Snowstorm
class Snowstorm

The Snowstorm class manages a collection of Snowflake objects, defining their limits, friction, falling speed, and wind.

Availability:

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.

Snowstorm(limits:Object, friction:Number, fallSpeed:Number, timeline:MovieClip)

Usage


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);

Parameters

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.

Description

Creates an instance of the Snowstorm class.


addFlake() : Void

Usage


storm.addFlake();

Parameters

Returns

Nothing.

Description

Adds a snowflake to a Snowstorm instance.


removeFlake() : Object

Usage


storm.removeFlake();

Parameters

Returns

Nothing.

Description

Removes a snowflake from a Snowstorm instance.


limits : Object

Usage


trace (storm.limits.xmin);
trace (storm.limits.xmax);
trace (storm.limits.ymin);
trace (storm.limits.ymax);
trace (storm.limits.zmin);
trace (storm.limits.zmax);

Description

The limits property of the Snowstorm.


friction : Number

Usage


trace (storm.friction);

Description

The friction property of the Snowstorm.


fallSpeed : Number

Usage


trace (storm.fallSpeed);

Description

The fallSpeed property of the Snowstorm.


flakes : Array

Usage


trace (storm.flakes.length);

Description

The flakes property of the Snowstorm.


wind : Number

Usage


trace (storm.wind);

Description

The wind property of the Snowstorm.