Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Adobe AIR Cookbook
Foreword
Credits
Author Bios
Technical Editor Bios
Community Contributor Bios
Preface
AIR 1.5
Flash Player 10 Support
Bonus Chapter Online: Developing Mashup AIR Applications
Who This Book Is For
Who This Book Is Not For
How This Book Is Organized
Conventions Used in This Book
This Book’s Example Files
Using the Code Examples
How to Use This Book
The Adobe AIR Cookbook Cook-Off
O’Reilly Cookbooks
Safari® Books Online
How to Contact Us
Acknowledgments
From David
From Marco
From Koen
From Rich
1. AIR Basics
Creating and Running an AIR Application with Flex Builder 3
Problem
Solution
Discussion
Creating a New AIR Application
Running and Debugging Your AIR Application
Creating and Running an AIR Application with Flash
Problem
Solution
Discussion
Creating a New AIR Application
Running and Debugging Your AIR Application
Creating and Running an AIR Application with HTML and JavaScript
Problem
Solution
Discussion
Creating a New AIR Application
Running Your AIR Application
Debugging an AIR Application with JavaScript
Problem
Solution
Discussion
Logging to the Introspector Console
Viewing the DOM and Application Source
Visually Inspecting Application Elements
Monitoring Network Communication
Signing and Exporting an AIR Application
Problem
Solution
Discussion
Signing and Exporting in Flex Builder
Signing and Exporting in Flash
Signing and Exporting with the AIR SDK
Signing an AIR File with a Trusted Certificate
Problem
Solution
Discussion
Understanding Synchronous and Asynchronous Programming in AIR
Problem
Solution
Discussion
Advantages of Synchronous Programming
Advantages of Asynchronous Programming
2. Application Settings
Targeting a Specific Version of AIR
Problem
Solution
Discussion
Setting the Application ID
Problem
Solution
Discussion
Flex/JavaScript
Flash
Setting the Application Name and Filename
Problem
Solution
Discussion
Flex/JavaScript
Flash
Setting the Application Version
Problem
Solution
Discussion
Flex/JavaScript
Flash
Editing the Application Description and Copyright Information
Problem
Solution
Discussion
Flex/JavaScript
Flash
Editing the Initial Window Settings
Problem
Solution
Discussion
Flex/JavaScript
Flash
Setting the Installation Folder for an Application
Problem
Solution
Discussion
Flex/JavaScript
Flash
Setting the Default Program Menu Folder
Problem
Solution
Discussion
Flex/JavaScript
Flash
Setting a Custom Application Icon
Problem
Solution
Discussion
Flex/JavaScript
Flash
Allowing an AIR Application to Interact with the Browser
Problem
Solution
Discussion
Flex/JavaScript
Flash
Setting the Application to Handle All Updates
Problem
Solution
Discussion
Flex/JavaScript
Flash
Determining the Application Version at Runtime
Problem
Solution
Discussion
ActionScript
JavaScript
Creating Multilingual AIR Installations
Problem
Solution
Discussion
Flex/JavaScript
Flash
3. Application Windows
Changing the Main Application Window
Problem
Solution
Discussion
Launching a New Window in ActionScript
Problem
Solution
Discussion
Launching a New Window (Flex)
Problem
Solution
Discussion
Launching a New Window (JavaScript)
Problem
Solution
Discussion
Creating Utility Windows
Problem
Solution
Discussion
ActionScript
JavaScript
Flex
Creating Lightweight Windows
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Creating a Full-Screen Window
Problem
Solution
Discussion
ActionScript
JavaScript
Noninteractive, Full-Screen Windows
Managing Multiple Windows
Problem
Solution
Discussion
ActionScript
JavaScript
Window Focus
Creating Windows with Custom Chrome
Problem
Solution
Discussion
ActionScript/Flash
ActionScript/Flex/MXML
JavaScript/HTML
Minimizing and Maximizing a Window
Problem
Solution
Discussion
ActionScript
JavaScript
Resizing a Window
Problem
Solution
Discussion
ActionScript
JavaScript
Closing a Window
Problem
Solution
Discussion
Displaying a Prompt Before Closing a Window
Problem
Solution
Discussion
ActionScript
JavaScript
Closing All Open Windows at Once
Problem
Solution
Discussion
ActionScript
JavaScript
Adding a Drop Shadow to a Custom Chrome Window in ActionScript
Problem
Solution
Discussion
Applying a Pixel Bender Filter to a Custom Chrome Window in ActionScript
Problem
Solution
Discussion
4. Screens
Positioning Windows on the Desktop
Problem
Solution
Discussion
ActionScript
JavaScript
Positioning Windows Across Multiple Monitors
Problem
Solution
Discussion
ActionScript
JavaScript
Determining the Monitors on Which an Application Is Currently Displayed
Problem
Solution
Discussion
ActionScript
JavaScript
5. HTML Content
Displaying HTML Content
Problem
Solution
Discussion
ActionScript/Flash
ActionScript/Flex
JavaScript/HTML
Accessing JavaScript from ActionScript in an HTML Container
Problem
Solution
Discussion
Accessing ActionScript from JavaScript in an HTML Container
Problem
Solution
Discussion
Scripting the DOM from ActionScript
Problem
Solution
Discussion
ActionScript/Flex
Accessing and Editing an HTML Style Sheet from ActionScript
Problem
Solution
Discussion
Accessing the HTML Container History List
Problem
Solution
Discussion
ActionScript/Flex
Bridging Content from Different Security Sandboxes
Problem
Solution
Discussion
Application Sandbox from Nonapplication Content
Communicate Between Different Nonapplication Sandboxes
Creating JavaScript Functions from ActionScript
Problem
Solution
Discussion
ActionScript/Flex
Scrolling HTML Content in ActionScript
Problem
Solution
Discussion
Using ActionScript Libraries Within an HTML Page
Problem
Solution
Discussion
6. PDF Support
Detecting Whether PDF Support Is Available
Problem
Solution
Discussion
ActionScript/Flex/Flash
JavaScript
Loading a PDF Document
Problem
Solution
Discussion
ActionScript/Flex
JavaScript/HTML
Communicating from AIR to PDF
Problem
Solution
Discussion
Communicating from PDF to AIR
Problem
Solution
Discussion
7. Clipboard Support
Working with the Clipboard Data Types
Problem
Solution
Discussion
ActionScript
JavaScript
Adding Data to the Operating System Clipboard
Problem
Solution
Discussion
ActionScript
JavaScript
Retrieving Data from the Operating System Clipboard
Problem
Solution
Discussion
ActionScript
JavaScript
Clearing Data from a Clipboard
Problem
Solution
Discussion
ActionScript
JavaScript
Using Deferred Rendering with Clipboard Data
Problem
Solution
Discussion
ActionScript
JavaScript
Creating Custom Clipboard Data Formats
Problem
Solution
Discussion
Transfer Modes
Sharing Data Between AIR Applications
ActionScript
JavaScript
8. Drag and Drop Support
Dragging Data Out of an Application in ActionScript
Problem
Solution
Discussion
Dragging Data Out of an Application in JavaScript
Problem
Solution
Discussion
Dragging Data Into an Application in ActionScript
Problem
Solution
Discussion
Dragging Data Into an Application in JavaScript
Problem
Solution
Discussion
Dragging and Dropping Within an Application in ActionScript
Problem
Solution
Discussion
Dragging and Dropping Within an Application in JavaScript
Problem
Solution
Discussion
9. File System Integration
Accessing Directory Aliases in the File Class
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Creating a New File or Directory
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Deleting a File or Directory
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Copying a File or Directory
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Moving a File or Directory
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Moving a File or Directory to the Trash
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Prompting the User to Select a File or Directory
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Reading Data from a File
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Writing Data to a File
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Creating a Temporary File or Directory
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Caching Images to Disk in ActionScript
Problem
Solution
Discussion
Searching for Files of a Given Extension in a Directory in ActionScript
Problem
Solution
Discussion
9.1. Migrating Serialization Changes in ActionScript
Problem
Solution
Discussion
Poor Serialization Choice
Migratable Serialization
Adding Members in Future Versions
10. Embedded SQL Database Programming
Creating a Database
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Connecting to a Database in Synchronous Mode
Problem
Solution
Discussion
ActionScript/Flex
JavaScript/HTML
Connecting to a Database in Asynchronous Mode
Problem
Solution
Discussion
ActionScript/Flex
JavaScript/HTML
Creating an In-Memory Database
Problem
Solution
Discussion
ActionScript
JavaScript
Creating an Encrypted Database
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Encrypting a Database with a Password
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Creating Tables in a Database
Problem
Solution
Discussion
Supported SQL Dialects
ActionScript/Flex
JavaScript
Querying a Database Synchronously
Problem
Solution
Discussion
Flex/ActionScript
JavaScript
Querying a Database Asynchronously
Problem
Solution
Discussion
Flex/ActionScript
JavaScript
Retrieving Results from a Query
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Using Parameters in Queries
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Including a Database in an Application
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Persisting Application Settings
Problem
Solution
Discussion
JavaScript
ActionScript/Flex
11. Encrypted Local Store
Storing Data in the Encrypted Local Store
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Retrieving Data from the Encrypted Local Store
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Removing and Resetting Data in the Encrypted Local Store
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Storing Application-Specific Data in the Encrypted Local Store
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Safeguarding Files with Encrypted Local Store
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
12. Application and Window Native Menus
Creating a Native Menu
Problem
Solution
Discussion
ActionScript/Flex
ActionScript/Flash
JavaScript
Adding Items to the Base Menu
Responding to Menu Events
Problem
Solution
Discussion
ActionScript/Flex/Flash
JavaScript
Listening for Select Events
ActionScript/Flex
ActionScript/Flash
JavaScript
Updating Before Display
ActionScript/Flex/Flash
JavaScript
Adding a Menu Separator
Problem
Solution
Discussion
ActionScript/Flex/Flash
JavaScript
Creating Nested Menus
Problem
Solution
Discussion
ActionScript/Flex
ActionScript/Flash
JavaScript
Creating a Native Window Menu (Windows)
Problem
Solution
Discussion
Creating a Native Window Menu (Mac)
Problem
Solution
Discussion
Creating a Context Menu (ActionScript)
Problem
Solution
Discussion
ActionScript/Flex
ActionScript/Flash
Creating a Context Menu (JavaScript)
Problem
Solution
Discussion
Assigning Keyboard Shortcuts to Menu Items
Problem
Solution
Discussion
Enabling and Disabling Menu Items
Problem
Solution
Discussion
Toggling Menu Items
Problem
Solution
Discussion
13. Taskbar and Dock Integration
Adding an Icon to the System Tray (Windows)
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Adding a Custom Menu to the System Tray Icon (Windows)
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Adding a Custom Menu to the Dock Icon (Mac)
Problem
Solution
Discussion
ActionScript
JavaScript
Changing the System Tray or Dock Icon
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Notifying the User Through the Dock (Mac)
Problem
Solution
Discussion
ActionScript
JavaScript
Notifying the User Through the Taskbar (Windows)
Problem
Solution
Discussion
ActionScript
JavaScript
14. File Types
Registering Custom File Types
Problem
Solution
Discussion
ActionScript
JavaScript
Determining Whether an Application Is the Default Application for a File Type
Problem
Solution
Discussion
ActionScript
JavaScript
Setting and Removing an Application as the Default Application for a File Type
Problem
Solution
Discussion
ActionScript
JavaScript
Getting the Path of the Default Application for a File Type
Problem
Solution
Discussion
ActionScript
JavaScript
15. Service Monitor Framework
Including the Service Monitor Framework in an Application (JavaScript)
Problem
Solution
Discussion
Monitoring Network Status with Adobe AIR
Including the Service Monitor Framework in an Application (Flash)
Problem
Solution
Discussion
Monitoring the Connection to a URL
Problem
Solution
Discussion
ActionScript/Flex
JavaScript/HTML
Reading Only the Head of a URL
Problem
Solution
Discussion
ActionScript/Flex
JavaScript/HTML
Monitoring the Connection to a Specific Port on a Server
Problem
Solution
Discussion
ActionScript/Flex
JavaScript/HTML
16. Application Updates
Creating Applications with Update Capabilities
Problem
Solution
Discussion
Flex/ActionScript
JavaScript
Creating Custom Update Interfaces for Applications with Update Capabilities
Problem
Solution
Discussion
Flex/ActionScript
JavaScript
17. AIR Application Distribution with the Browser API
Including the Browser API
Problem
Solution
Discussion
Detecting the Installed Version of AIR
Problem
Solution
Discussion
ActionScript/Flex
JavaScript
Launching an AIR Application from the Browser
Problem
Solution
Discussion
Finding the Publisher ID
Using the Browser API
Installing an AIR Application from the Browser
Problem
Solution
Discussion
Using the Included Seamless Install Badge
Problem
Solution
Discussion
Configuring the Install Badge
Index
Colophon
← Prev
Back
Next →
← Prev
Back
Next →