Chapter 4. Copy-and-paste and drag-and-drop
This chapter covers
Copy-and-paste and drag-and-drop operations are a standardized way for users to interact with an application, so it’s a good idea to build these behaviors into AIR applications. For example, if you build an application that displays images from a network source, many users would expect and appreciate the ability to save copies of the images locally by dragging the image from the AIR application to the desktop.
An important thing to understand about drag-and-drop and copy-and-paste in AIR is that they run at the system level. You may be used to enabling these sorts of operations within Flex or Flash applications, but there’s a big distinction to be made here. When you build Flex or Flash applications for the Web, all your drag-and-drop and most of your copy-and-paste operations are limited to the one instance of Flash player. For example, you can’t drag an image from a Flash application running in a browser and save it to the desktop. AIR enables these operations to be extended beyond the confines of Flash player. You can allow users to transfer data within, as well as to and from, an AIR application using these operations.