This course is divided into modules, most of which present new information and contain demonstrations and walkthroughs. At the end of each module, you will find a summary and a short review to test your knowledge of the module’s content.
Contents.
Introducing the Course
Introducing Mastery Learning.................2
Understanding the course format.................3
Reviewing the course prerequisites.................4
Reviewing the course outline.................5
Introducing the Adobe Integrated Runtime (AIR)
Exploring the AIR development toolset.................8
Understanding the runtime application.................8
Understanding Adobe AIR 1.5.................10
Understanding the Adobe AIR SDK.................11
Looking at Flex Builder 3.................11
Reviewing the Adobe AIR tools for Flex Builder 3.................12
Creating AIR projects.................12
Exporting AIR applications.................13
Walkthrough 1: Review an AIR application.................15
Getting started with AIR
Creating your first AIR application.................20
Creating an AIR project.................20
Creating a main application.................22
Compiling an AIR application.................22
Walkthrough 1: Create an AIR application.................23
Packaging and deploying applications.................25
Exporting a release.................25
Code-signing an application.................25
Selecting application contents.................26
Installing an application.................27
Uninstalling an AIR application.................29
Walkthrough 2: Export and install an application.................30
Understanding AIR fundamentals.................32
Introducing the AIR file format.................32
Introducing the application descriptor.................32
Walkthrough 3: Examine the AIR package and change the descriptor.................33
Getting help and other resources.................36
Help inside Flex Builder.................36
Documentation.................36
AIR URLs.................36
Creating native windows
Creating windows.................40
Defining a window with MXML.................40
Instantiating an MXML window with ActionScript.................41
Opening and closing window components.................41
Walkthrough 1: Create, open, and close a native window.................42
Modifying the window display.................45
Changing the window chrome.................45
Changing the window type.................45
Setting window transparency.................45
Controlling display of default Flex chrome.................46
Using full screen display.................46
Walkthrough 2: Control window chrome, transparency, and full screen display.................47
Manipulating windows.................50
Referring to a window object.................50
Manipulating a window.................51
Walkthrough 3: Control window behaviors when a title bar is removed.................52
Controlling the main application appearance.................55
Configuring initial appearance and behavior.................55
Understanding component display order.................55
Walkthrough 4: Change main application window shape.................56
Controlling window behavior using window events.................58
Handling window events.................58
Walkthrough 5: Control window behavior through event listeners.................60
Using the file system
Using the File class.................66
Accessing common directories.................66
Referencing a file or directory.................67
Moving and copying file system objects.................68
Walkthrough 1: Using the File class.................69
Enabling visual file system interaction.................72
Allowing user to specify files or directories.................72
Introducing the Flex 3 file browsing components.................72
Walkthrough 2: Use file system browsing and display components.................75
Removing files from the file system.................78
Determing the File object type.................78
Recycling or deleting file system objects.................78
Walkthrough 3: Interacting with visually specified File objects.................80
Using file streams.................85
Reading and writing files.................85
Walkthrough 4: Create a directory or UTF-8 (Unicode) text file.................88
Working with binary data.................92
Using the ByteArray class.................92
Reading binary data.................92
Writing binary data.................93
Walkthrough 5: Read, modify, and write a binary file to the desktop.................94
Connecting applications
Communicating between applications.................100
Using the LocalConnection class.................100
Walkthrough 1: Connect to and call a method in another AIR application.................103
Connecting to web applications using URL Requests over HTTP.................106
Requesting a URL via HTTP.................106
Using the URLRequest class.................106
Using the URLVariables class.................107
Using the URLLoader class.................107
Using the Base64Encoder class.................107
Walkthrough 2: Interact with a remote service using posted URL data.................108
Displaying HTML content.................111
Understanding the HTMLLoader class.................111
Using the
Walkthrough 3: Load HTML into an AIR application.................112
Detecting network availability.................113
Monitoring network state changes.................114
Detecting HTTP resource availability.................114
Detecting Socket connectivity.................115
Walkthrough 4: Add network detection.................116
Lab:
Using the clipboard
Moving data with copy and paste.................140
Understanding the Clipboard.................140
Using the generalClipboard.................140
Getting data from the clipboard.................141
Writing data to the clipboard.................141
Walkthrough 1: Moving data to and from the system clipboard.................143
Using drag and drop.................145
Exploring the drag and drop stages.................145
Understanding how dragged data is transferred.................146
Walkthrough 2: Drag images from the operating system into the application.................148
Persisting application data
Using an embedded SQL database.................154
Understanding the database file.................154
Opening a database.................154
Creating a database.................155
Walkthrough 1: Create a new database.................156
Using SQL statements.................160
Managing the database................. 160
Managing the data.................160
Using best practices with local databases.................161
Walkthrough 2: Update the database and records.................162
Working with SQL data types.................166
Using Date data.................166
Using XML data.................167
Using BLOB data.................167
Using query parameters.................167
Saving and retrieving binary image data.................167
Walkthrough 3: Use date/time and BLOB data.................169
Understanding AIR security
Considering AIR security.................174
Introducing AIR security.................174
Introducing security sandboxes.................174
Introducing AIR security best practices.................175
Detecting AIR capabilities.................176
Using the Capabilities object.................176
Walkthrough 1: Respond to player capability.................177
Using encrypted data storage.................178
Walkthrough 2: Using encrypted local storage.................179
Understanding AIR application updating.................182
Using the Updater class.................182
Determining current version at runtime.................183
Walkthrough 3: Updating applications and preventing downgrade attacks.................184
Encrypting local database files.................190
Implementing database encryption.................190
Walkthrough 4: Creating an encrypted local database.................191
Customizing Deployment
Setting the application’s desktop icon.................196
Using application icons.................196
Walkthrough 1: Add icon to application.................197
Setting system tray icon.................198
Addressing the nativeApplication.................198
Using the system tray.................198
Walkthrough 2: Adding a system tray icon.................199
Lab:
Appendix A: Student Setup Guide
System requirements.................220
Hardware requirements.................220
Software Requirements.................220
Setup instructions.................221
Installation overview.................221
Install Adobe AIR.................221
Install Adobe Flex Builder 3.................222
Install course files and test installation.................226
Read this full Dreamweaver Tutorial of AIR 1.5: Building Desktop Applications with Flex 3