由Adobe公司的AIR开发团队审核的《Adobe AIR 1.5 Cookbook》,叙述了Web开发者和应用程序设计者最希望了解的实践、基本原理以及主题。本书中的实战技巧可以帮助你解决在使用Adobe AIR建立桌面的富互联网应用程序(Rich Internet Appliction)时所遇到的各种任务和情景。这是通过即学即用的实践解决方案学习Adobe AIR微妙之处的理想方式,并且本书详细解释了它们为何及如何运作。这些技巧可以帮助你:
使用Flex、Flash或HTML和Ajax建立AIR应用程序
创建数据库并连接至你的应用程序
为PC和Mac整合原生菜单
与Service Monitor Framework共同运作
利用Adobe AIR Update Framework
利用自定义chrome和应用程序图标创建标志性的桌面体验
使用Seamless Install BadgeAIR应用程序还有更多。《Adobe AIR 1.5 Cookbook》包含了许多AIR开发团队中新进明星的秘诀,如David Tucker、Rich Tretola、Marco Casario和Koen De Weggheleire,以及由Adobe和O'Reilly主办的《Adobe AIR 1.5 Cookbook》社区站点(www.adobe.com/go/air_cookbook)上许多访问者张贴的解决方案。如果你已经准备好利用Adobe AIR来扩展你的技能,那么这本书就是你期待已久的。
本书共分17个章节,主要对叙述了Web开发者和应用程序设计者希望了解的实践、基本原理以及主题。书中的实战技巧可以帮助你解决在使用Adobe AIR建立桌面的富互联网应用程序时所遇到的各种任务和情景,并且详细解释了它们为何及如何运作。该书可供各大专院校作为教材使用,也可供从事相关工作的人员作为参考用书使用。
David Tucker,就职于Universal Mind公司,是一名从事Flex和AIR应用程序设计的软件工程师。
Foreword
Credits
Preface
1. AIR Basics
1.1 Creating and Running an AIR Application with Flex Builder 3
1.2 Creating and Running an AIR Application with Flash
1.3 Creating and Running an AIR Application with HTML and JavaScript
1.4 Debugging an AIR Application with JavaScript
1.5 Signing and Exporting an AIR Application
1.6 Signing an AIR File with a Trusted Certificate
1.7 Understanding Synchronous and Asynchronous Programming in AIR
2. Application Settings
2.1 Targeting a Specific Version of AIR
2.2 Setting the Application ID
2.3 Setting the Application Name and Filename
2.4 Setting the Application Version
2.5 Editing the Application Description and Copyright Information
2.6 Editing the Initial Window Settings
2.7 Setting the Installation Folder for an Application
2.8 Setting the Default Program Menu Folder
2.9 Setting a Custom Application Icon
2.10 Allowing an AIR Application to Interact with the Browser
2.11 Setting the Application to Handle All Updates
2.12 Determining the Application Version at Runtime
2.13 Creating Multilingual AIR Installations
3. Application Windows
3.1 Changing the Main Application Window
3.2 Launching a New Window in ActionScript
3.3 Launching a New Window (Flex
3.4 Launching a New Window (JavaScript
3.5 Creating Utility Windows
3.6 Creating Lightweight Windows
3.7 Creating a Full-Screen Window
3.8 Managing Multiple Windows
3.9 Creating Windows with Custom Chrome
3.10 Minimizing and Maximizing a Window
3.11 Resizing a Window
3.12 Closing a Window
3.13 Displaying a Prompt Before Closing a Window
3.14 Closing All Open Windows at Once
3.15 Adding a Drop Shadow to a Custom Chrome Window in ActionScript
3.16 Applying a Pixel Bender Filter to a Custom Chrome Window in ActionScript
4. Screens
4.1 Positioning Windows on the Desktop
4.2 Positioning Windows Across Multiple Monitors
4.3 Determining the Monitors on Which an Application Is Currently Displayed
5. HTML Content
5.1 Displaying HTML Content
5.2 Accessing JavaScript from ActionScript in an HTML Container
5.3 Accessing ActionScript from JavaScript in an HTML Container
5.4 Scripting the DOM from ActionScript
5.5 Accessing and Editing an HTML Style Sheet from ActionScript
5.6 Accessing the HTML Container History List
5.7 Bridging Content from Different Security Sandboxes
5.8 Creating JavaScript Functions from ActionScript
5.9 Scrolling HTML Content in ActionScript
5.10 Using ActionScript Libraries Within an HTML Page
6. PDF Support
6.1 Detecting Whether PDF Support Is Available
6.2 Loading a PDF Document
6.3 Communicating from AIR to PDF
6.4 Communicating from PDF to AIR
7. Clipboard Support
7.1 Working with the Clipboard Data Types
7.2 Adding Data to the Operating System Clipboard
7.3 Retrieving Data from the Operating System Clipboard
7.4 Clearing Data from a Clipboard
7.5 Using Deferred Rendering with Clipboard Data
7.6 Creating Custom Clipboard Data Formats
8. Drag and Drop Support
8.1 Dragging Data Out of an Application in ActionScript
8.2 Dragging Data Out of an Application in JavaScript
8.3 Dragging Data Into an Application in ActionScript
8.4 Dragging Data Into an Application in JavaScript
8.5 Dragging and Dropping Within an Application in ActionScript
8.6 Dragging and Dropping Within an Application in JavaScript
9. File System Integration
9.1 Accessing Directory Aliases in the File Class
9.2 Creating a New File or Directory
9.3 Deleting a File or Directory
9.4 Copying a File or Directory
9.5 Moving a File or Directory
9.6 Moving a File or Directory to the Trash
9.7 Prompting the User to Select a File or Directory
9.8 Reading Data from a File
9.9 Writing Data to a File
9.10 Creating a Temporary File or Directory
9.11 Caching Images to Disk in ActionScript
9.12 Searching for Files of a Given Extension in a Directory in ActionScript
9.13 Migrating Serialization Changes in ActionScript
10. Embedded SQL Database Programming
10.1 Creating a Database
10.2 Connecting to a Database in Synchronous Mode
10.3 Connecting to a Database in Asynchronous Mode
10.4 Creating an In-Memory Database
10.5 Creating an Encrypted Database
10.6 Encrypting a Database with a Password
10.7 Creating Tables in a Database
10.8 Querying a Database Synchronously
10.9 Querying a Database Asynchronously
10.10 Retrieving Results from a Query
10.11 Using Parameters in Queries
10.12 Including a Database in an Application
10.13 Persisting Application Settings
11. Encrypted Local Store
11.1 Storing Data in the Encrypted Local Store
11.2 Retrieving Data from the Encrypted Local Store
11.3 Removing and Resetting Data in the Encrypted Local Store
11.4 Storing Application-Specific Data in the Encrypted Local Store
11.5 Safeguarding Files with Encrypted Local Store
12. Application and Window Native Menus
12.1 Creating a Native Menu
12.2 Responding to Menu Events
12.3 Adding a Menu Separator
12.4 Creating Nested Menus
12.5 Creating a Native Window Menu (Windows
12.6 Creating a Native Window Menu (Mac
12.7 Creating a Context Menu (ActionScript
12.8 Creating a Context Menu (JavaScript
12.9 Assigning Keyboard Shortcuts to Menu Items
12.10 Enabling and Disabling Menu Items
12.11 Toggling Menu Items
13. Taskbar and Docklntegration
13.1 Adding an Icon to the System Tray (Windows
13.2 Adding a Custom Menu to the System Tray Icon (Windows
13.3 Adding a Custom Menu to the Dock Icon (Mac
13.4 Changing the System Tray or Dock Icon
13.5 Notifying the User Through the Dock (Mac
13.6 Notifying the User Through the Taskbar (Windows
14. File Types
14.1 Registering Custom File Types
14.2 Determining Whether an Application Is the Default Application for a File Type
14.3 Setting and Removing an Application as the Default Application for a File Type
14.4 Getting the Path of the Default Application for a File Type
15. Service Monitor Framework
15.1 Including the Service Monitor Framework in an Application (JavaScript
15.2 Including the Service Monitor Framework in an Application (Flash
15.3 Monitoring the Connection to a URL
15.4 Reading Only the Head of a URL
15.5 Monitoring the Connection to a Specific Port on a Server
16. Application Updates
16.1 Creating Applications with Update Capabilities
16.2 Creating Custom Update Interfaces for Applications with Update Capabilities
17. AIR Application Distribution with the Browser API
17.1 Including the Browser API
17.2 Detecting the Installed Version of AIR
17.3 Launching an AIR Application from the Browser
17.4 Installing an AIR Application from the Browser
17.5 Using the Included Seamless Install Badge
Index
"这本书史无前例地涵盖了Adobe AIR 1.5和AIR开发的一切,你甚至找不到一个更好的创作团队来帮你了解些。当我从事AIR开发时,这本书是除了我的键盘之外,另一个不可或缺的工具。" ——Lee Elrimelow Platform Evangelist,Adobe Systems,Inc。