Alright I made a waterfall in Actionscript 3.0, this is my code (on the main timeline)
var mcArray:Array = new Array();
for(var i:uint=0; i<100; i++) {
var myMc:MovieClip = new waterfall;
myMc.y = 85;
myMc.x = Math.random()*60 + 813.5;
myMc.scaleX = myMc.scaleY = Math.random()*0.75
myMc.gotoAndPlay(Math.ceil(Math.random()*20));
addChild(myMc);
mcArray.push(myMc);
}
var myArray:Array = new Array();
for(var u:uint=0; u<50; u++) {
var yourMc:MovieClip = new splash;
yourMc.y = 300;
yourMc.x = Math.random()*60 + 758.5;
yourMc.rotation = Math.random()*90 - 45
yourMc.scaleX = yourMc.scaleY = Math.random()*0.75
yourMc.gotoAndPlay(Math.ceil(Math.random()*10));
addChild(yourMc);
myArray.push(yourMc);
}
The first array is the waterfall, and the second array is the splash effect. However, I want these things to be a part of the background, so for instance if something flies past the waterfall it doesn't get covered by the falls. I tried to put the code into the "background" movie clip but that doesn't work. So if anyone can help me out with this that'd be great.