Actionscript Code:if (Key.isDown(attack2Key)&&shot2reload == 0) {
for (i=0; i<2; i++) {
shot2++;
shot2reload = 30
var newname = "shot2_"+shot2;
_root.attachMovie("shot2", newname, shot2*100+1);
_root[newname]._y = _root.player._y;
_root[newname]._x = _root.player._x+i*40-20;
_root[newname].yVel = 1;
_root[newname].onEnterFrame = function() {
this.yVel = this.yVel+2//^1.1;
this._y -= this.yVel;
if (this._y<0) {
this.removeMovieClip();
}
};
}
}
Just solved my own problem. Sorry for wasting space.




Reply With Quote