Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference

(nextflipdebug5) #1

54 | Chapter 3: Working with JavaScript and HTML Within AIR


TIP
You can find more information on the EXT-JS frame-
work at http://extjs.com/.

Accessing AIR APIs from JavaScript


In addition to the standard JavaScript and HTML DOM
APIs, JavaScript code running within the application context
in an AIR application can also take advantage of APIs pro-
vided by the runtime, as well as Flash Player APIs and even
ActionScript 3 libraries. This greatly extends the capabilities
of JavaScript over the APIs available in the browser, and
includes functionality such as:



  • Playing sounds

  • Manipulating images and bitmaps

  • Reading and writing files to and from the local file
    system

  • Creating, controlling and manipulating native windows

  • Making direct socket connections (both binary and text
    based)

  • Accessing the clipboard

  • Leveraging an embedded database to store data


TIP
You can find examples of how to leverage these features
in the cookbook section in Chapter 4.

This section discusses how to leverage AIR and Flash Player
APIs from JavaScript, as well as how to load and leverage
compiled ActionScript libraries from within JavaScript.

Free download pdf