I'm fairly sure that the browser is what's intercepting your keystrokes.
As for a fix in Flash, in general I don't think there is one. But there are
smarter people than me on this list, so someone else may have a solution I
don't.
However, if capturing those keystrokes are important to ya, you could try
seeing if JavaScript can capture them. I've seen some elearning pass through
our shop that uses JS to capture keys and send them to flash using
ExternalInterface, but I've never tested them against existing browser
shortcuts. It's on my to do list to test out, but rush projects keep
getting in the way.
On 8/21/07, Vaughn, David (Contractor) (J6B) <[EMAIL PROTECTED]>
wrote:
>
> Hello all. I've been working with a couple of developers over on the
> FlashNewbie list on this without success. I'm hoping that with the
> larger Flash developer audience on this list someone may have an answer.
>
> I'm trying to assign keypress combinations to buttons such as Control+a,
> Control+b, and so on. Problem is that I cannot find any code that
> captures the Control+a or Control+c key combos. The theory is that
> Windows XP is intercepting the keys since those key combos are used by
> the Windows OS for selecting and copying. I've tried several variations
> of code but all fail on Control+a and Control+c. Here is my latest
> attempt (mind the wrap):
>
> createTextField("message_txt", 100, 0, 0, 550, 400);
>
> var ctrlPressed:Boolean = false;
> var ctrlKeyListener:Object = new Object();
> var letterKeyListener:Object = new Object();
>
> ctrlKeyListener.onKeyDown = function() {
> if (Key.getCode() == 17) {
> ctrlPressed = true;
> message_txt.text = "CTRL down";
> }
> };
>
> letterKeyListener.onKeyDown = function() {
> if (ctrlPressed == true && Key.getCode() == 65) {
> message_txt.text = "CTRL+A down";
> }
> };
>
> Key.addListener(ctrlKeyListener);
> Key.addListener(letterKeyListener);
>
> If I change the key code to B (66) rather than A (65) this code works
> great.
>
> Is there a simple way to make this work or will Control+a and Control+c
> fail under all circumstances?
>
> Thanks.
>
> Dave
> _______________________________________________
> [email protected]
> 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
>
_______________________________________________
[email protected]
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