| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jul 2007
Posts: 7
|
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. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Oct 2007
Posts: 4
|
Amisha, your code looks correct at a quick glance. I'm at work so can't check but it *looks* exactly like code I use (unless there's a small typographical error I'm missing). The response you're getting sounds like it's not supported. One thing you can do is change your code to:
isSupported = fscommand2("SetSoftKeys", "Left", "Right"); And then do a trace on isSupported. Per the docs it should return a 0 if the device supports that command, -1 if not. My device that it works on is WM5 , not 02 also. |
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| problem to jump to next input textfield with tab key when embedFonts is set to true | maes100 | ActionScript 2.0 | 1 | 10-23-2007 11:55 AM |
| Tab key focus problem | p.stupka | ActionScript 3.0 | 3 | 09-08-2007 06:18 PM |
| Problem with loading unloading clips and dynamic text | sah302 | ActionScript 1.0 (and below) | 1 | 01-06-2006 06:19 PM |
| problem with class import : Extended Tween | alexandre_lab | ActionScript 2.0 | 6 | 11-01-2005 11:06 AM |
| Flash Number type and c# float and decimal types. Convertion problem within Flash. | maglez | ActionScript 2.0 | 2 | 06-02-2005 06:14 PM |