Adobe Flex 3 Help

Copy-and-paste basics

Package

Classes

flash.desktop

  • Clipboard

Constants used with the copy-and-paste API are defined in the following classes:

  • ClipboardFormats
  • ClipboardTransferMode
The copy-and-paste API contains the following classes.

The static Clipboard.generalClipboard property represents the operating system clipboard. Access the system clipboard through the static Clipboard.generalClipboard property. The Clipboard class provides methods for reading and writing data to clipboard objects. Clipboard objects are also used to transfer data through the drag-and-drop API.

The HTML environment provides an alternate API for copy and paste. Either API can be used by code running within the application sandbox, but only the HTML API can be used in non-application content.

The HTMLLoader and TextField classes implement default behavior for the normal copy and paste keyboard shortcuts. To implement copy and paste shortcut behavior for custom components, you can listen for these keystrokes directly. You can also use native menu commands along with key equivalents to respond to the keystrokes indirectly.

Different representations of the same information can be made available in a single Clipboard object to increase the ability of other applications to understand and use the data. For example, an image might be included as image data, a serialized Bitmap object, and as a file. Rendering of the data in a format can be deferred so that the format is not actually created until the data in that format is read.