Wabysabi

The Personal and Professional website of Daniel Wabyick

Tuesday, March 18, 2008

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

Chart Export Screenshot

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:
  1. Adobe AIR Runtime
  2. AIR Clipboard Example
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.

posted by admin at 1:10 pm  

Powered by WordPress