(keitai-l) Re: Fwd: Flash Lite 2.1 i-mode key capture

From: Darren Osadchuk <darren_at_ludicroussoftware.com>
Date: 06/30/08
Message-id: <48682159.9040405@ludicroussoftware.com>
Hi Dan,

You can capture up/down key presses in AS 2 using a 3-button hack: set 
the focus to the middle button ( Selection.setFocus() ), then when the 
user presses up (the top button receives focus), fire scroll_up() and 
return the focus to the middle button. Do something similar for the 
bottom button. I don't believe that there is a way using listeners to 
capture up/down presses.

If you want to drop me a note off-list I can send you a sample fla.

Thanks,
Darren

--
Darren Osadchuk
darren@LudicrousSoftware.com
www.LudicrousSoftware.com

Dan Atkinson wrote:
> Hi
> I am trying to detect up and down button events in flash lite 2.1 using AS 2
> but it's having problems when testing on a P905i phone.
> 
> The basic code is:
> 
> keyListener.onKeyDown = function() {
> 
>     if (Key.getCode() == Key.UP){
>         scroll_up();
>     }
> 
>     if (Key.getCode() == Key.DOWN){
>         scroll_down();
>     }
> }
> 
> Key.addListener(keyListener);
> 
> On the P905i the key code being returned is 9 for up and down, all the other
> keys function as normal, Does anyone know anyway to fix this?
> 
> Thanks
> 
> -Dan
> 
> 
> 
> This mail was sent to address darren@ludicroussoftware.com
> Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/ 
> 
Received on Mon Jun 30 02:57:22 2008