AIR Example - Native Drag-n-Drop and Clipboard Integration

AIR provides some great API’s for integrating with other applications. Via the NativeDragManager and Clipboard classes, you can easily export your data in a multitude of formats, including PNG and CSV. Recently I had an project that utilized these features, and I figured it would be good to share the techniques with the community.
In particular this example, framed as a basic stock chart application, demonstrates the following features:
- Native drag-and-drop with PNG images and custom image proxies.
- Copy to Clipboard / Export with both PNG and CSV data formats - Right-click on the chart to get your options
- Example code for customizing the HLOCChart class look-and-feel
These features were factored into ‘behavior’ classes so that they can (fairly) easily be applied to your own AIR apps.
| This application requires the following be installed:Please click on each link in the order above to complete the installation process. |
Source is available by right-clicking and selecting ‘view-source’ in the application from anywhere but the chart.
I’m not able to install this application.
Comment by kanu kukreja — March 24, 2008 @ 7:14 pm
I emailed asking a few more details … I’ll post the solution (hopefully) in the comments.
Comment by admin — March 25, 2008 @ 5:17 am
[...] Native Drag-n-Drop and clipboard integration [...]
Pingback by Sönke Rohde » on AIR tour Berlin links — June 5, 2008 @ 3:44 am
Nice clear example, exactly what I was looking for
Thanks for sharing.
Comment by Romu — June 18, 2008 @ 3:24 am