On Sun, 07 Nov 2010 10:46:24 +0100
Pablo Rodríguez <[email protected]> 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 <[email protected]>

Reply via email to