onClipEvent (load) {
function reset() {
if (this._name == "worm") {
this._visible = false;
} else {
this._visible = true;
}
this.dead = 0;
this.speed = random(2)+2;
this._y = 0;
this._x = random(1000);
}
this.reset();
}
onClipEvent (enterFrame) {
this._y+= this.speed;
if (this._y>768) {
this.reset();
}
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น