זה מה שרשום אצלי ב MC קוד: onClipEvent (load) { A = this._y; B = 13; C = false; D = 0; } onClipEvent(enterFrame){ if(Key.isDown(Key.LEFT)){ this._x -= players_move; this.gotoAndStop(1); LRDU = 1; trace("המשתנה מתחלף"); } if(Key.isDown(Key.RIGHT)){ this._x += players_move; this.gotoAndStop(2); LRDU = 2; trace("המשתנה מתחלף"); } if(Key.isDown(Key.DOWN)){ this._y += players_move; LRDU = 3; } if(Key.isDown(Key.UP)){ this._y -= players_move; LRDU = 4; } if(Key.isDown(Key.SHIFT)){ switch(LRDU){ case 1 : this.pl.gotoAndPlay(3); trace("הפעולה מגעיה"); break; case 2 : this.pr.gotoAndPlay(3); trace("הפעולה מגעיה"); break; } } if (Key.isDown(32)) { C = true; } if (C) { this._y -= B; B -= 1 //enemyspeed=9 if (this._y == A) { B = 13; //enemyspeed=3 C = false; } } } וכם הבנתי את הקוד אבל אין לולאה שחוזרת אחרי הפרודה הזאת יעני לחזר אחד ועוד אחד ואז עוד אחד מביןן?
onClipEvent (load) { A = this._y; B = 13; C = false; D = 0; } onClipEvent(enterFrame){ if(Key.isDown(Key.LEFT)){ this._x -= players_move; this.gotoAndStop(1); LRDU = 1; trace("המשתנה מתחלף"); } if(Key.isDown(Key.RIGHT)){ this._x += players_move; this.gotoAndStop(2); LRDU = 2; trace("המשתנה מתחלף"); } if(Key.isDown(Key.DOWN)){ this._y += players_move; LRDU = 3; } if(Key.isDown(Key.UP)){ this._y -= players_move; LRDU = 4; } if(Key.isDown(Key.SHIFT)){ switch(LRDU){ case 1 : this.pl.gotoAndPlay(3); trace("הפעולה מגעיה"); break; case 2 : this.pr.gotoAndPlay(3); trace("הפעולה מגעיה"); break; } } if (Key.isDown(32)) { C = true; } if (C) { this._y -= B; B -= 1 //enemyspeed=9 if (this._y == A) { B = 13; //enemyspeed=3 C = false; } } }