Mar
16
I'm lookin for a "falling bomb" script
Written by
anonym
In the Attachment is an example file. The problem by this is that the "deepness" is missing.
My AS-skills are very limited and i'm unable to create this kind of AS by myself. :pa:
My goal is to get an almost realistic bomb-rain-fall.
It has to start slow and get faster. The bombs in the back should be smaller and darker.
In case it's not possible to make the bombs in the back smaller it could be manage with three separate rows of bombs... back = smallest, middle = middle and front = biggest and every row with his own AS.
However... the sript i have isn't that good, cause one bomb has a low speed but the same size.
Any help would be great.
http://www.kirupa.com/developer/flash8/snow.htm
Thanks a lot.. i knew this one :)
But this didn't work for me well cause of the random movement.
But fortunately i found a good and simple AS2 Rain script.
Here's the script:
First frame:
for (k=0; k<10; k++) {
duplicateMovieClip(_root.snow, "snow"+k, k);
}
on movieclip:
onClipEvent (load) {
movieWidth = 800;
movieHeight = 400;
i = 1+Math.random()*2;
k = -Math.PI+Math.random()*Math.PI;
this._xscale = this._yscale=50+Math.random()*120;
this._alpha = 75+Math.random()*120;
this._x = -10+Math.random()*movieWidth;
this._y = -10+Math.random()*movieHeight;
}
onClipEvent (enterFrame) {
rad += (k/180)*Math.PI;
this._x -= Math.cos(rad);
this._y += i;
if (this._y>=movieHeight) {
this._y = -5;
}
if ((this._x>=movieWidth) (this._x<=0)) {
this._x = -10+Math.random()*movieWidth;
this._y = -5;
}
}
But where or how i can adjust the speed?
http://www.kirupa.com/developer/flash8/snow.htm
#If you have any other info about this subject , Please add it free.# |