can someone please explain what does this actionscript will do ?
onClipEvent (enterFrame) {
if (this._x<0) {
this._y = -30;
radius = (Math.floor(Math.random()*(50-10))+10);
xcenter = (Math.floor(Math.random()*(440-35))+35);
speed = (Math.floor(Math.random()*(3-1))+1);
}
if (this._x>500) {
this._y = -30;
radius = (Math.floor(Math.random()*(50-10))+10);
xcenter = (Math.floor(Math.random()*(440-35))+35);
speed = (Math.floor(Math.random()*(3-1))+1);
}
if (this._y>450) {
this._y = -30;
radius = (Math.floor(Math.random()*(50-10))+10);
xcenter = (Math.floor(Math.random()*(440-35))+35);
speed = (Math.floor(Math.random()*(3-1))+1);
}
if (_root.w == 0) {
_root.fireb = 1;
_root.p += 1;
duplicateMovieClip(_root.bebullet, "bebullet"+_root.p, _root.p);
_root.w = (Math.floor(Math.random()*(125-75))+75);
} else {
_root.w -= 1;
}
degree += speed;
radian = (degree/45)*Math.PI;
this._x = xcenter+Math.cos(radian)*radius;
this._y += 1;
}
This
onClipEvent (enterFrame) {
if (this._x<0) {
this._y = -30;
radius = (Math.floor(Math.random()*(50-10))+10);
xcenter = (Math.floor(Math.random()*(440-35))+35);
speed = (Math.floor(Math.random()*(3-1))+1);
}
if (this._x>500) {
this._y = -30;
radius = (Math.floor(Math.random()*(50-10))+10);
xcenter = (Math.floor(Math.random()*(440-35))+35);
speed = (Math.floor(Math.random()*(3-1))+1);
}
if (this._y>450) {
this._y = -30;
radius = (Math.floor(Math.random()*(50-10))+10);
xcenter = (Math.floor(Math.random()*(440-35))+35);
speed = (Math.floor(Math.random()*(3-1))+1);
}
if (_root.w == 0) {
_root.fireb = 1;
_root.p += 1;
duplicateMovieClip(_root.bebullet, "bebullet"+_root.p, _root.p);
_root.w = (Math.floor(Math.random()*(125-75))+75);
} else {
_root.w -= 1;
}
degree += speed;
radian = (degree/45)*Math.PI;
this._x = xcenter+Math.cos(radian)*radius;
this._y += 1;
}
and this
onClipEvent (enterFrame) {
if (this, hitTest(_root.enemya)) {
_root.blasta2._x = _root.enemya._x;
_root.blasta2._y = _root.enemya._y;
tellTarget (_root.blasta2) {
gotoAndPlay(1);
}
_root.enemya._y = -30;
_root.enemya.radius = (Math.floor(Math.random()*(50-10))+10);
_root.enemya.speed = (Math.floor(Math.random()*(3-1))+1);
_root.enemya.xcenter = Math.floor(Math.random()*(450))+15;
_root.score += 10;
if (this != _level0.bullet) {
this.removeMovieClip();
}
}
if (this, hitTest(_root.enemyb)) {
_root.blastb2._x = _root.enemyb._x;
_root.blastb2._y = _root.enemyb._y;
tellTarget (_root.blastb2) {
gotoAndPlay(1);
}
_root.enemyb._y = -30;
_root.enemyb.radius = (Math.floor(Math.random()*(50-10))+10);
_root.enemyb.xcenter = Math.floor(Math.random()*(450))+15;
_root.enemyb.speed = (Math.floor(Math.random()*(3-1))+1);
_root.score += 10;
if (this != _level0.bullet) {
this.removeMovieClip();
}
}
if (this != _level0.bullet) {
if (_root.fire == 1) {
this._y -= 5;
this._visible = 1;
}
if (this._y<0) {
this.removeMovieClip();
}
}
}
thank you .