I want to create a waterfall in flash cs6. I found this waterfall from http://www.flashandmath.com/flashcs4/waterfall/
import com.flashandmath.dg.display.*;
var waterfall:Waterfall;
init();
function init():void {
waterfall = new Waterfall(200,300,true);
waterfall.x = 20;
waterfall.y = 10;
stage.addChild(waterfall);
waterfall.startFlow();
waterfall.noSplashes = false;
waterfall.dropsToAddEachFrame = 8;
waterfall.targetColor = 0x33B2FF;
waterfall.waterTopWidth = 72;
waterfall.leftMargin = 2;
waterfall.minAngle = Math.PI/12;
waterfall.maxAngle = Math.PI/3;
waterfall.minMagnitude = 0.7;
waterfall.maxMagnitude = 1.3;
waterfall.fadeAmount = -1;
waterfall.display.minGray = 0.9;
}
This is from a cs4 file. I tried to save that as a cs6 or cs5 and i got this error:
Scene 1, Layer 'Layer 1', Frame 1, Line 11 1172: Definition com.flashandmath.dg.display could not be found.
Can anyone explain me why this doesn't work or if possible how to make it work?
You need to include the package (com.flashandmath.dg.display
) in your project. To do so, add it to the library section of File>ActionScript Settings