
Originally Posted by
biskero
Ciao,
you have fscommand2("ResetSoftKeys"); and not fscommand2("SetSoftKeys", "", "");
Also this code go on the very first line of the first frame or code not inside a function:
fscommand2 ("DisableKeypadCompatibilityMode");
fscommand2("SetSoftKeys", "", "");
Alessandro
I made another application to perform some tests.
This new application has only one frame
First, reset the keys, then Set the labels you want to use and then have the function that will get the clicks.
But, unfortunately, simply activate the text field the buttons back to the original device.
I tried to do the same experiment using the componetne TextInput and a normal text input type. In both cases, the result was the same.
Follow the new code:
Code:
fscommand2("ResetSoftKeys");
fscommand2 ("DisableKeypadCompatibilityMode");
fscommand2("SetSoftKeys", "Fechar", "Entrar");
Key.removeListener(oListener);
var oListener:Object = new Object();
oListener.onKeyDown = function():Void
{
var keyCode = Key.getCode();
if (keyCode == ExtendedKey.SOFT1) {
fscommand2("Quit");
} else if (keyCode == ExtendedKey.SOFT2) {
// Obtem os valores
var user:String = usuario.text;
var pass:String = senha.text;
retorno.text = "Usuário: "+user+" senha: "+pass;
}
}
Key.addListener(oListener);
Thanks.