fire
-> Download parentScript-FireObj73.zip (6 Kb)

Fire is a continuation of earlier explorations of semirandomness, form, color, and sequence in Director. The "fire" consists of one or more "flames", each of which may have one or more associated "flamelets". The region (meaning top-down, right to left, bottom-up, or left to right as in the screen caps below), its axial and base scale relative to the dimensions of the movie, its color, and its orientation can be specified independently for every flame, as well as the number of associated flamelets. The color, orientation, and base and axial scale (with respect to the parent flame) of each flamelet can be likewise set. Variance, specified as an integer from 0 to 100, sets the percentage of some of the aforementioned properties of flames and flamelets that are set randomly.

fire image (150 px X 90 px) fire image (150 px X 90 px) fire image (150 px X 90 px) fire image (150 px X 90 px)

-> view the movie (.dcr, 8 Kb)

The above screenshots were taken of a Shockwave movie where a fire object is instantiated, 3 flames are added, and the fire is drawn to the stage (a vector shape cast member is created and its image is drawn to the stage using copyPixels). This process is repeated 16 times before the stage is cleared and begun again. The constructor call and subsequent method calls to the fire class instance :

gFire = new(script "FireObj")  
gFire.addFlame (2, 4, [0,198,0], [147, 255, 72], 5, 60, 10, 30, 30, 90)
gFire.addFlame (2, 4, [0,155,0], [147, 255, 72], 6, 50, 30, 15, 20, 90)
gFire.addFlame (2, 4, [0,198,0], [147, 255, 72], 5, 75, 20, 10, 20, 0)
gFire.drawFireConsecutive ()
                
The addFlame method has 10 arguments. They are (in order) :
intDirection An integer (1 or 2). If intDirection = 1, then the terminus of this flame is closer base 1 than base 2. Else if intDirection = 2, then the terminus of this flame is closer to base 2 than base 1.
intRegion An integer (1, 2, 3, or 4). The orientation of the flame, clockwise from top.
listFlameRGB Array of RGB values for this flame.
intFlameletRGB Array of RGB values for the flamelets associated with this flame.
intNumFlamelets The number of flamelets associated with this flame (integer).
intAxialScaleFlame Integer 0 - 100. The length of the flame relative to the movie stage.
intBaseScaleFlame Integer 0 - 100. The width of the flame's base relative to the movie stage.
intAxialScaleFlamelets Integer 0 - 100. The length of the flamelet relative to the parent flame.
intBaseScaleFlamelets Integer 0 - 100. The width of the flamelet's base relative to thats of the parent flame.
intVariance Integer 0 - 100. The percentage of selected properties of flames and associated flamelets that will be calculated semirandomly.