But there is probably no guaranty that the event is fired twice on all
FlashPlayers/OSes.
So I would have to reset the state variable "manually".

2007/8/14, Ricky Bacon <[EMAIL PROTECTED]>:
> Matthias Dittgen wrote:
> > Hello,
> >
> > in my current project the onKeyDown event is fired twice, when the key
> > is hit in Textfields.
> > I googled already this problem and always found only a description of
> > the same problem as my one but no solution. Anyone solved this
> > already?
> >
> > Here's some example code (nothing special):
> >
> >               // trace "Enter pressed" twice, while Enter is pressed only 
> > once
> >               keyListener.onKeyUp = function()
> >               {
> >                       if (Key.getCode() == Key.ENTER)
> >                               trace("Enter pressed");
> >               }
>
> Use a state tracking variable instead of an event based call for
> repeatable input events.
>
> -Ricky
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to