Beginning Flash, Flex, and AIR Development for Mobile DevicesISBN: 978-0-470-94815-6
Paperback
400 pages
October 2011
This title is out-of-print and not currently available for purchase from this site.
|
CHAPTER 1: AN INTRODUCTION TO FLASH, FLEX, AND AIR 1
Adobe Flash 1
Flash on Mobile Devices 2
ActionScript 3.0 2
ECMAScript 2
Key Concepts 3
The Flex Framework 11
Flex 4.5.1 11
MXML 12
Spark Library Components 14
Data Binding 21
Flex Mobile Application Structure 22
Considerations for Mobile Development 31
Adobe AIR 31
Summary 32
CHAPTER 2: GETTING STARTED 35
Using Flash Builder 4.5.1 35
Working with Workspaces 36
Using the Flash Perspective 37
Using the Flash Debug Perspective 38
Using the Source and Design Views 39
Creating a Mobile Project Using Flash Builder 41
Creating a Hello World App Example 41
Defi ning Run Confi gurations 51
Running Mobile Applications on the Desktop 52
Running Mobile Applications on the Device 55
Summary 64
CHAPTER 3: BUILDING AIR APPLICATIONS FOR ANDROID, BLACKBERRY, AND IOS DEVICES 67
AIR Application Descriptor Files 67
Setting Properties in the AIR Application Descriptor File 68
Manually Editing the Application Descriptor File for the Hello World App 69
BlackBerry Tablet OS Confi guration 79
Packaging for Google Android 82
Packaging for Apple iOS 88
Packaging for BlackBerry Tablet OS 94
Updating AIR Applications 96
Retrieving Details from the Application Descriptor File 97
Using the Version Number 97
Summary 98
CHAPTER 4: TOUCH, MULTITOUCH, AND GESTURES 101
Multitouch Interactions 102
Determining Touch Input Support 102
Creating a Multitouch and Gestures App Example 103
Touch Event Handling 106
Registering Touch Events on Interactive Objects 114
Determining the Supported Touch Points 117
Gesture Interactions 117
Determining Which Gestures Are Supported on a Device 117
Gesture Events and Event Handling 118
Registering Gesture Events on Interactive Objects 119
Handling Gesture Events 124
Utilizing the Multitouch Panel in Device Central 128
Summary 128
CHAPTER 5: DEVELOPING FOR MULTIPLE SCREEN SIZES 131
Considerations for Multiple Screen Sizes 132
Pixel Density 132
Utilizing Device DPI 133
Adapting Content to Stage Size 138
Using the StageScaleMode and StageAlign Classes 138
Handling Stage Resize Events 140
Creating the Sprite Layout App Example 140
Handling Device Orientation 151
Using the StageOrientation Class 152
Using the StageOrientationEvent Class 152
Using Layouts in Flex 154
Aligning Items in Group Containers 155
Summary 174
CHAPTER 6: DEBUGGING APPLICATIONS 177
Setting Breakpoints 177
Global Error Handling 188
Handling Uncaught Errors 188
Try…Catch Statements 191
Stepping through Code 193
Summary 196
CHAPTER 7: WORKING WITH THE FILESYSTEM 199
Reading from the Filesystem 200
The File and FileStream Classes 200
Creating a Files Explorer App Example 203
Modifying Files and Filesystems 216
Creating New Files and Directories 216
Utilizing Browse Dialogs 229
Opening a Single File 230
Opening Multiple Files 230
Saving a Single File to a Location 236
Summary 237
CHAPTER 8: WORKING WITH DATA 239
Detecting Changes in Network Availability 239
Retrieving Data with URLRequest 240
Monitoring the URLRequest Object 240
Creating the Maintaining Data App Example 241
Using SQLite for Storing Data 247
Creating a SQLite Database 248
Summary 286
CHAPTER 9: WORKING WITH AUDIO AND VIDEO 289
Introducing the Open Source Media Framework 289
Creating a URLResource Object 290
Creating a MediaElement Object 291
Media Traits 292
Using the MediaTraitType Class to Identify Traits 293
Using the MediaPlayer to Play Media Elements 294
Using the MediaPlayerSprite Class to Play Media Resources 297
Handling Trait Events 298
Using an AudioEvent Object 298
Using the Flex OSMF Wrapper 300
Using the VideoPlayer Component 300
Creating a MediaPlayer Example 301
Summary 313
CHAPTER 10: UTILIZING DEVICE FEATURES 315
Using the Device's Camera 315
Using the CameraUI Class 316
Creating a Camera App Example 316
Capturing Sound Using the Device's Microphone 323
Using the Microphone Class 323
Using the SampleDataEvent Class 324
Creating a Microphone App Example 326
Utilizing the Device's Web Controller 336
Using the StageWebView Class 336
Creating a Browser App Example 338
Utilizing the Device's Geolocation Sensor 346
Using the Geolocation Class 346
Using the GeolocationEvent Class 347
Creating a Geolocation App Example 348
Summary 355
INDEX 359