Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 3. Interacting with the Clipboard > Exploring the Clipboard Class

Exploring the Clipboard Class

In AIR, any interaction with the system’s clipboard is handled by the Clipboard class. To get a reference to the clipboard of the user’s OS, you use the static generalClipboard property of the Clipboard class. Reading from the clipboard is done via the getData() method, as shown in this simple example.

var clip:Clipboard = Clipboard.generalClipboard;
var txt:String = clip.getData(ClipboardFormats.TEXT_FORMAT).toString();


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial