amisha
09-25-2007, 08:57 AM
Hi
I am trying to override the functionality of left and right soft key of Windows mobile O2 device. I have written the code as
fscommand2("SetSoftKeys", "Left", "Right");
fscommand2("FullScreen", true);
Key.removeListener (myListener);
var myListener:Object = new Object ();
myListener.onKeyDown = function () {
var keyCode = Key.getCode ();
if (keyCode == ExtendedKey.SOFT1) {
Status = "Left soft key pressed";
}
if (keyCode == ExtendedKey.SOFT2) {
Status = "Right soft key pressed";
}
}
Key.addListener (myListener);
It is working perfectly on the emulator but when I test it on the device and press the right soft key. The application is exiting.
Is there any other way for it.
I am trying to override the functionality of left and right soft key of Windows mobile O2 device. I have written the code as
fscommand2("SetSoftKeys", "Left", "Right");
fscommand2("FullScreen", true);
Key.removeListener (myListener);
var myListener:Object = new Object ();
myListener.onKeyDown = function () {
var keyCode = Key.getCode ();
if (keyCode == ExtendedKey.SOFT1) {
Status = "Left soft key pressed";
}
if (keyCode == ExtendedKey.SOFT2) {
Status = "Right soft key pressed";
}
}
Key.addListener (myListener);
It is working perfectly on the emulator but when I test it on the device and press the right soft key. The application is exiting.
Is there any other way for it.