3 Replies Latest reply on Mar 24, 2008 10:42 AM by ttdevelop

    emulate keystroke in Flash app?

    ttdevelop Level 1
      I am trying to invoke keystroke in flash without users typing. It is a bit different from typical keyboardEvent because the user won't be typing anything. I am wondering whether this is possible to be achieved within the power of Flash or Javascript.
        • 1. Re: emulate keystroke in Flash app?
          Greg Dove Level 4
          You cannot use flash to send keystroke events to another application if this is what you mean.

          You can manually 'simulate' a keystroke event handler that you yourself have set up inside flash simply by calling the handler function. (Its not really simulating a keystroke, its merely manually calling your handler - which would perform the same activity that you have set up to respond to a true keystroke in any case).
          • 2. Re: emulate keystroke in Flash app?
            ttdevelop Level 1
            Yea I see, I am just trying to solve the problem where sometimes some external windows app interfere with Flash's hotkey, I don't know how to make sure the hotkey will be executed on flash instead of the external app. Like if you do Ctrl+P, how do I make sure it executes on my game instead of printing out a page from IE or other apps? I think it is more like a setFocus problem now.
            • 3. Re: emulate keystroke in Flash app?
              ttdevelop Level 1
              Yea I see, I am just trying to solve the problem where sometimes some external windows app interfere with Flash's hotkey, I don't know how to make sure the hotkey will be executed on flash instead of the external app. Like if you do Ctrl+P, how do I make sure it executes on my game instead of printing out a page from IE or other apps? I think it is more like a setFocus problem now.