onKeyDown question

Hello!
Ok, I did what you said and it still doesn’t work. :frowning: I will write the code for my onKeyDown function here but I don’t think it’s easy to understand without a lot of details (and my comments are in french…)
Anyway here it is with the stuff you told me to add :

var myListener = new Object();
myListener.onKeyDown = function () {
if(x!=2){
if(_root[“m”+cote]._visible == false){
//Si la lettre tapée par l’usager est égale à celle du bloc
if (String.fromCharCode(Key.getAscii()) == _root[“b”+cote+bloc].lettre.text) {
//Augmente la vitesse de la balle
Intervalle = 30;
for(i=1;i<=4;i++){
for(j=1;j<=_global.nbBloc[i-1];j++){
if(String.fromCharCode(Key.getAscii()) == _root[“b”+i+j].lettre.text) {
//Soulève tous les blocs contenant la lettre tapée
_root[“b”+i+j].action.gotoAndPlay(“c”+i+j+“s”);
}
else
{
_root[“b”+cote+bloc].action.gotoAndPlay(“v”+cote+bloc+“b”);
_root[“b”+i+j].action.gotoAndPlay(“c”+i+j+“b”);
}
}
}
//Soulève le bloc vert contenant la lettre tapée
_root[“b”+cote+bloc].action.gotoAndPlay(“v”+cote+bloc+“s”);
}
else{
//Si la lettre tapée par l’usager n’est pas égale à celle du bloc
for(i=1;i<=4;i++){
for(j=1;j<=_global.nbBloc[i-1];j++){
if (String.fromCharCode(Key.getAscii()) == _root[“b”+i+j].lettre.text){
//Soulève tous les blocs contenant la lettre tapée
_root[“b”+i+j].action.gotoAndPlay(“c”+i+j+“s”);
}
else
{
//Mets les bloc à “bas”
_root[“b”+i+j].action.gotoAndPlay(“c”+i+j+“b”);
}
//Si on tape la barre d’espacement
if (Key.getAscii() == 32){
//Met tous les blocs à “bas”
_root[“b”+i+j].action.gotoAndPlay(“c”+i+j+“b”);
}
//Met le bloc vert à “bas”
_root[“b”+cote+bloc].action.gotoAndPlay(“v”+cote+bloc+“b”);
}
}
}
}
x = 2;
}
}
myListener.onKeyUp = function () {
x=1;
}
Key.addListener(myListener);

Hope it’s useful and that you could understand it.
Thanks!