già il codice che utilizzi dovrebbe permetterlo, anche se dovresti mettere in blocco con if...else if il movimento a destra o a sinistra e ugualmente per alto e basso
diverso tempo fa feci un test a tal proposito, questo il codice:
esca era un clip sullo schermo, e come ti ho detto su, funzionava correttamente anche in diagonale (schiacciando due frecce, es. BASSO-DESTRA)Codice PHP:var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(Key.LEFT)) {
esca._x -= 20;
} else if (Key.isDown(Key.RIGHT)) {
esca._x += 20;
}
if (Key.isDown(Key.UP)) {
esca._y -= 20;
} else if (Key.isDown(Key.DOWN)) {
esca._y += 20;
}
};
Key.addListener(keyListener);

Rispondi quotando