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

From: Dan Atkinson <dan_at_danatkinson.com>
Date: 06/30/08
Message-ID: <75c5a980806300035j4be044asd521340c219a16bc@mail.gmail.com>
Darren
Thanks for your reply.

I wasn't able to do the 3 button thing as the clip I was trying to scroll
had a lot of buttons and inputs that need focus. I managed do it by putting
all the buttons and inputs in an array and use a focusListener to see if the
user is going down or up and then do a scroll depending on where on the
screen the current focus was.

Thanks for your help, the selection class is pretty good.

-Dan

On Mon, Jun 30, 2008 at 8:57 AM, Darren Osadchuk <
darren@ludicroussoftware.com> wrote:

> 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/
> >
>
> This mail was sent to address dan@danatkinson.com
> Need archives? How to unsubscribe? http://www.appelsiini.net/keitai-l/
>
>


-- 
Dan Atkinson
dan@danatkinson.com
Received on Mon Jun 30 10:35:59 2008