AIR APIs
Here are some notes regarding some of the APIs for AIR that were showcased at the on AIR Bus Tour in Chicago.
Window API
Multi-window support. Transparent windows. Z-Ordering. All of the various aspects of OS windows can be applied to your AIR windows. When you use transparent windows with no chrome, the arrow will click through the transparent part of images as well. Nice.
File I/O
Reading and writing of files. No problem. Can launch native file dialogs. Can handle selection, selecting multiples, directories, etc. Async and sync versions of the APIs. Would use async API if you’re doing very heavy processing.
Database Support
SQLite embedded database. Zero setup, uses a single file. Not for accessing remote databases. This is for using a completely local database. Easily storing data in a database format, but in a local manner. He didn’t show any examples of this.
Drag and Drop / Clipboard
System level drag and drop support is there! AIR app to AIR app, or AIR app to OS app and back again. Or to the desktop. Can use it for handling URLs, files, text, or even AS objects. When marking something as draggable, you can assign one or many “transfer formats”. So when you drag an item to another app, if it doesn’t accept one data type, perhaps it will recognize another data type. For instance, if you have an image and a text transfer format, the receiving app may not like the image format, but it recognizes the text format, so it proceeds without a problem.
Service Monitoring
Handles the online/offline support. Will monitor the network interface for changes. Will detect not just network connectivity, but you can test access to a particular service. Do I have access to http://my.address.com/myservice?
Conclusion
These APIs work in JavaScript too because of the bridge, but it all works very well in Flex. Daniel Dura was the presenter, and hit site at http://www.danieldura.com has a lot of AIR information.
