a finalement :(
qu'est ce qui ne vas pas ?
onClipEvent(KeyDown) {
if (Key.getCode() == Key.UP) { haut = 1 }
if (Key.getCode() == Key.DOWN) { bas = 1 }
if (Key.getCode() == Key.LEFT) { gauche = 1 }
if (Key.getCode() == Key.RIGHT) { droite = 1 }
if (haut == 1) { this._y -= 8 }
if (bas == 1) { this._y += 8 }
if (gauche == 1) { this._x -= 8 }
if (droite == 1) { this._x += 8 }
}
onClipEvent(KeyUp) {
if (Key.getCode() == Key.UP) { haut = 0 }
if (Key.getCode() == Key.DOWN) { bas = 0 }
if (Key.getCode() == Key.LEFT) { gauche = 0 }
if (Key.getCode() == Key.RIGHT) { droite = 0 }
}
onClipEvent(enterFrame) {
if (this._y <0) { this._y = 400 }
if (this._y >400) { this._y = 0 }
if (this._x <0) { this._x = 550 }
if (this._x >550) { this._x = 0 }
if (this.hitTest(228.1,131,296.1,199)) {
root.rond1.stop();
root.rond1.rond4.play(2);
_root.text = "Bravo"
}
}
c'est possible de définir une zone avec le hitTest ?

Bl@cknight91Titi
