onClipEvent (enterFrame){
if (Key.isDown(Key.LEFT))
this._x = (_x-5);
if (Key.isDown(Key.RIGHT))
this._x = (_x+5);
if (Key.isDown(Key.UP))
this._y = (_y-5);
if (Key.isDown(Key.DOWN))
this._y = (_y+5);
if(this.hitTest(_root.sfondo)) {
// hitTest è una proprietà!...
trace("GAME OVER");
}}
/* Problema: l'oggetto in questione quando sta sopra l'oggetto strada da comunque game over, ma l'oggetto strada sta sopra l'oggetto sfondo, come posso fare per evitare questo errore? */

Rispondi quotando