It looks like the listener stops listening to the first pressed key and monitors the onKeyUp only for the second one. So it might not be the Key class that is concerned here ... maybe event handling ? I can't really tell, would have to know more on how these work together.

The thing is, that if 2 keys are pressed at the same time we would expect to see a trace output like this (for those who don't want to or can't try it themselves):

   CODE:

var myListener  = new Object();
myListener.onKeyDown = function() //change _myListener to myListener {
   trace("down: " + Key.getCode());
};
myListener.onKeyUp = function()
{
   trace("up: " + Key.getCode());
};
Key.addListener(myListener);


   Expected Output for key pressed A (65) and C (67)  where A is
   pressed first then C,  then A is released then C:

   down: 65
   down: 67
   down: 67
   up: 65
   down: 67
   down: 67
   up: 67



   but instead we get this in Flash 8

   down: 65
   down: 67
   down: 67
   down: 67
   down: 67
   up: 67

   works as expected in Flash 7


That's all I can say for now in this case ...

A


franto wrote:

Hi

I;ve problem with Key class in Flash 8
Please read about it on my blog [Example included]. Is it bug or
feature? Does someone know?

Here is address: http://www.franto.com/blog2/flash-8-key-class-bug-or-feature

Thanks
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Franto

http://blog.franto.com
http://www.flashcoders.sk
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to