View Full Version : if (Key.getCode() == 232)
jeanphilippe
August 28th, 2003, 05:46 AM
hi,
why this code don't work?
How to procede with accentued key?
thanks
Code:
monEcouteur = new Object();
monEcouteur.onKeyDown = function() {
if (Key.getCode() == 232) {
trace("Vous avez appuyé sur è.");
}
};
Key.addListener(monEcouteur);
grandsp5
August 28th, 2003, 03:06 PM
Key.ASCII maybe?
ahmed
August 28th, 2003, 03:10 PM
shouldn't be
monEcouteur = new Object();
monEcouteur.onKeyDown = function() {
if ( Key.isDown(232) ) trace( "Vous avez appuyé sur è.");
}
Key.addListener(monEcouteur);
mlk
August 28th, 2003, 08:29 PM
another frog YIHA!
bien lbonjour de la france !
jeanphilippe
August 29th, 2003, 03:38 AM
salut mlkdesign:)
>ahmed > have you test???
it doesn't work:)
>grandsp5 > KEY.ASCII >no
the problem : accentued letters
thanks:)
mlk
August 29th, 2003, 04:09 AM
the thing is, is the keycode the same for english and french keyboard ? (I the the 'é' is the number '8' on a qwerty keyboard - I should check though...
if your not sure which keycode it is; try something like that:
new function on the _root level:
testnumber = 100
function bob(testnumber) {
if ( Key.isDown(testnumber) )
trace( "Vous avez appuyé sur è. Numéro de la touche: "+testnumber);
}
and on your button:
on(release){
testnumber+=1
_root.bob(testnumber)
}
sort of a debugging script - you'd have to go through 200 keycodes.... though it might work. Dunno, ask kax or ahmed.
jeanphilippe
August 29th, 2003, 04:31 AM
232 is the good code for the letter "é" on french keyboard
but the problem is accentued letters like à, è, é, ù, etc....
:) :sigh:
mlk
August 29th, 2003, 04:38 AM
i don't get it.. what's the PROBLEM ?
it won't showup in flash ??? then use: System.UseCodePage=true;
jeanphilippe
August 29th, 2003, 04:47 AM
monEcouteur = new Object();
monEcouteur.onKeyDown = function() {
if (Key.getCode() == 232) {
trace("Vous avez appuyé sur è.");
}
};
Key.addListener(monEcouteur);
have you test ?
and System.UseCodePage=true; and Unicode UTF8 aren't the solution !
The question :
Is it possible to do action with key (accentued letter) ?
:)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.