Hey, here is a gravity script I made
put it on a MC
onClipEvent (load) {
XSpeed = math.random()*25-math.random()*25;
YSpeed = -(math.random()*10)-10;
Scale = math.random()*75+25;
Gravity = Scale/70;
Rot = random(6);
setProperty(this, _rotation, math.random()*360);
setProperty(this, _x, math.random()*450+50);
setProperty(this, _y, math.random()*350);
setProperty(this, _xscale, Scale);
setProperty(this, _yscale, Scale);
}
onClipEvent (enterFrame) {
setProperty(this, _rotation, getProperty(this, _rotation)+XSpeed*Rot);
setProperty(this, _x, this._x+XSpeed);
setProperty(this, _y, this._y+YSpeed);
YSpeed = YSpeed+Gravity;
XSpeed = XSpeed/1.05;
if (this._y>350) {
setProperty(this, _y, 350+gravity);
XSpeed = math.random()*25-math.random()*25;
YSpeed = -(math.random()*15)-10;
}
if (this._x>500) {
setProperty(this, _x, this._x-1);
XSpeed = -XSpeed;
}
if (this._x<50) {
setProperty(this, _x, this._x+1);
XSpeed = -XSpeed;
}
}
this will make the movie clip bounce in random directions
30 fps is the best frame rate for it