Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Note: The operating system and the web browser will process keyboard events before Adobe Flash Player or AIR. For example, in Microsoft Internet Explorer, pressing Ctrl+W closes the browser window before any contained SWF file dispatches a keyboard event.</p> <p>You can just do something similar to this</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"&gt; &lt;mx:Script&gt; &lt;![CDATA[ private function init():void{ this.addEventListener(MouseEvent.CLICK, clickHandler); this.addEventListener(KeyboardEvent.KEY_DOWN,keyPressed); } private function clickHandler(event:MouseEvent):void { stage.focus = this; } private function keyPressed(evt:KeyboardEvent):void{ if(evt.ctrlKey &amp;&amp; evt.keyCode == 65) trace("CTRL A is pressed"); if(evt.ctrlKey &amp;&amp; evt.keyCode == 66) trace("CTRL B is pressed"); } ]]&gt; &lt;/mx:Script&gt; &lt;/mx:Application&gt; </code></pre> <p>Then To write to the operating system clipboard:</p> <pre><code>import flash.desktop.ClipboardFormats; var copy:String = "A string to copy to the system clipboard."; Clipboard.generalClipboard.clear(); Clipboard.generalClipboard.setData(ClipboardFormats.TEXT_FORMAT, copy); </code></pre> <p>To read from the operating system clipboard: </p> <pre><code>import flash.desktop.ClipboardFormats; var pasteData:String = Clipboard.generalClipboard.getData(ClipboardFormats.TEXT_FORMAT) as String; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload