swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] issue with key listener


From: Chris
Subject: Re: [Swftools-common] issue with key listener
Date: Sun, 7 Nov 2010 11:50:11 +0100

On Sun, 07 Nov 2010 10:46:24 +0100
Pablo Rodríguez <address@hidden> wrote:

> On 11/06/2010 10:42 PM, Chris wrote:
> > The last line of your code reads like one of my many typos Pablo.
> >
> >    Key.addlisterner(key_listen);  ???
> >
> > That could be why it doesn't work! ;o)
> 
> Thanks for your help, Chris.
> 
> I should check spelling more frequently ;-).
> 
> But even with the fix, it works with:
> 
>   key_listener.onKeyDown = function() {
>        if ((Key.isDown(70)) || Key.isDown(102)) {
>                control_movie();
>        }
>   };
> 
> but not with:
> 
>   key_listener.onKeyDown = function() {
>        if (Key.isDown(102)) {
>                control_movie();
>        }
>   };
> 
> I cannot understand why the second option doesn't work.

Actually it does work.  But not in the way I think you are thinking it
does.

> What am I missing here?

I'd guess you've forgotten that Key Codes and ASCII codes are different.

HTH.


Regards,



-- 
Chris <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]