codice:
sequenza = "";
testo = "SITO";
function controllo() {
Eframe = this;
Eframe.onEnterFrame = function() {
if (sequenza == testo) {
if (numLivNow == numLiv) {
getURL("sito.html")
}
}
delete Eframe.onEnterFrame;
};
}
function assegna(premuto) {
sequenza = sequenza+premuto;
controllo();
}
keyListener = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == 73) {
assegna("I");
} else if (Key.getCode() == 83) {
assegna("S");
} else if (Key.getCode() == 84) {
assegna("T");
} else if (Key.getCode() == 79) {
assegna("O");
}
};
Key.addListener(keyListener);
bisogna provarlo perchè lo buttato giù cosi e bisogna aggiungere tutti i tasti nell'oggetto keyListener.
Per sapere i codici dei tasti cerca "Tasti della tastiera e valori dei codici tasto" nell'help di flash.