2D charts and graphs, generating with Spark primitives, 150–164
sketching program example, 158
using FXG, 158
2D shapes, rendering with Spark primitives, 130
AccelerometerEvent class, 270–272
accentColor style, 108
ACCESS_COARSE_LOCATION, 276
ACCESS_FINE_LOCATION, 276
ACCESS_NETWORK_STATE permission, 179
ACCESS_WIFI_STATE permission, 179
ActionBar buttons, 425
ActionBar class, 401, 405, 407, 418, 425
ActionBars, 72, 74, 81–83, 85–86, 90
actionBarVisible, 86
actionContent, 85
actionLayout, 85
ActionScript, 364
ActionScript (AS) files, 355, 358
ActionScript language, performance of, 393–394
ActionScript Mobile Project, 422
ActionScript3 Code, 206
actionScriptProperties: [internal], 16
activate event, 76
Activity AppEntry.java, 234
Activity HelloWorld, 217
activityLevel property, 245, 287–288
ADB, Android Debug Bridge, 171
adb install command, 189
addedToStage event, 46
addEventListener method, 56–57
addEventListener/callback paradigm, 58
addPerson( ) method, 209–210, 232
addWebsiteInfo( ) method, 233
ADL, AIR Debug Launcher, 166
Adobe AIR runtime emulator, 357
creating new document from, 341–343
previewing content in, 343–344
Adobe Flash Builder
exporting release builds from, 188–189
setting initial application permissions in, 177–178
workflow from Adobe Fireworks to, 353–354
workflow from Adobe Photoshop to, 349–350
Adobe Flash Capability Reporter application, 10–13
Adobe Flash Catalyst 1.5, 7
Adobe Flash music player, 294–323
implementing pause functionality, 296–298
reading ID3 tag metadata, 295–296
Adobe Flash Platform system, 5–28
running applications
from Adobe Flash Builder, 13–26
from Adobe Flash Professional, 10–13
Adobe Flash Player, 5
Adobe Flex SDK, 7
AIR, 6
Adobe Flash Builder software, 8
Adobe Flash Catalyst platform, 9
Adobe Flash Professional software, 8
Device Central application, 8
workflow, 9
Adobe Flash Player, 5
Adobe Flash Professional, 355–356
changing application permissions in, 176–177
workflow, 356
from Adobe Illustrator to Adobe Flash Professional, 352–353
from Adobe Photoshop to, 347–348
Adobe Flex SDK, 7
Adobe Illustrator, workflow to Adobe Flash Professional from, 352–353
Adobe Integrated Runtime. See AIR
Adobe Photoshop, workflow, 346–350
to Flash Professional, 347–348
ADT (AIR Developer Tool), 175–176
AIR Developer Tool, 175
Android Development Tools, 167
creating code signing certificates using, 185–186
adt command, 193
adt -installApp -platform android -package command, 189
adt -installRuntime -platform android command, 171
afterOrientation, 46
AIR (Adobe Integrated Runtime), 6, 175–193, 199–241
accessing SQLite database in, 208–211
sending notifications in, 227–238
basic Android concepts, 212–221
Broadcast receivers, 220
downloading and installing, 214
code signing certificates, 183–186
deploying from command line, 191–193
emulator runtime, 171
exporting release builds from Adobe Flash Builder, 188–189
HTML pages
installing released versions, 171
installing within Android Emulator, 171
invoking URI handlers in, 200–202
and native Android integration, 239–241
publishing
from Adobe Flash Professional, 187–188
running Flex applications in Android Emulator, 189–190
runtime, 171
AIR Application Descriptor
application section, 183
icon section, 182
AIR Debug Launcher, 166
AIR Developer Tool. See ADT
AIR for Android Settings option, 176, 182–183, 187
AIR Intermediate files, 192
AIR_SDK path, 175
airbootstrap.jar file, 227
-airDownloadURL option, 197
AIRI files, AIR Intermediate, 192
albumCover bitmap, 313
albumTitle, 404
Alert dialog, 280
allowMultipleSelection property, 116
alpha attribute, 132
Amazon Appstore, 188, 194, 196–198
Android
Broadcast receivers, 220
downloading and installing, 214
native functionality, AIR and, 239–241
permissions, 250
Android Debug Bridge, 171, 189
Android Development Tools plugin, 167
Android devices keys to desktop keys mapping, 173
development options, 170
dial button, 170
hang-up button, 170
hidden features, 173
installing AIR within, 171
installing Android SDK, 166–168
keyboard special keys, 172
launching from command line, 174
limitations, 166
multitouch support, 166
running Flex applications in, 189–190
android executable, 168
Android Icon Templates, 180
Android Market, publishing to, 194–196
developer account, 194
packaging application, 194–195
uploading Adobe AIR application, 195–196
Android OS, 165
Android SDK, installing, 166–168
Android Service, 215
Android Virtual Device (AVD), 168–170
android.hardware.camera, 250
android:icon attribute, 225
android.intent.action.MAIN, 218
android.intent.category.LAUNCHER, 218
android:label attribute, 225
AndroidManifest.xml file, 214–216, 218–219, 225–226, 233, 238
AndroidNative.apk, 240
android.permission.ACCESS_FINE_LOCATION permission, 274
android.permission.CAMERA, 250
android.permission.RECORD_AUDIO setting, 245
animation. See also graphics
parallel and sequence, 139–140
APIs (application programming interfaces)
Flash Builder profiler, 390
PerformanceTest v2 Beta tool, 389–390
APK file, 176, 182, 188–189, 193
APP_HOME variable, 240
app-desc, 27
AppEntry class, 225
AppIconsForPublish directory, 182
Apple App Store, 194
Apple Operating System (iOS), 425–426
application architecture, 355
Application class, 16
application descriptor file, 179
Application MXML file, 73
Application object, 33
application programming interfaces. See APIs
Application.applicationDPI, 35
applicationDPI property, 33–34, 37, 40, 43, 302
applicationDPI setting, 42
applications, 71, 120–165, 198–227. See also mobile applications
Adobe Flash music player, 299–323
MusicService implementation, 303–306
Presentation Model pattern, 300–301
ViewNavigatorApplication, 301–302
application permissions, 176–179
code signing certificates, 183–185
deploying from command line, 191–193
exporting release builds from Adobe Flash Builder, 188–189
running Flex applications in Android Emulator, 189–190
installing AIR within, 171
installing Android SDK, 166–168
constructing mobile UIs with Flex Mobile, 71–96
blank application option, 82–83
passing data between View objects, 93–94
persisting View and session data objects, 94–96
TabbedViewNavigatorApplication option, 77–82
ViewNavigator container and View objects, 84–92
ViewNavigatorApplication option, 73–74
descriptor file, manually changing application permissions in, 178–179
changing in Adobe Flash Professional, 176–177
manually changing in application descriptor file, 178–179
setting initial in Adobe Flash Builder, 177–178
running
with Adobe Flash Builder, 23–26
sending notifications in, 227–238
settings, 250
BusyIndicator, 117
HSlider, 116
sample with combined HSlider, Scroller, and BusyIndicator controls, 117–120
Scroller, 117
soft keyboard support, 104–107
[App-Name]-app.xml, 16
[AppName]HomeView.mxml, 16
[AppName].mxml, 16
Appstore, Amazon. See Amazon Appstore
AppWidgetMyHelloWidget, 220
*-app.xml file, 44
ArrayCollection variable, 80, 113, 152, 416
AS (ActionScript) files, 355, 358
assets/app.swf, 228
attributeName.phone, 403
attributeName.portrait, 403
attributeName.portraitPhone, 403
audio and video support, 5
autoClose property, 317
autoPlay property, 336
autoRepeat property, 110
AVD (Android Virtual Device), 168–170
backgroundAlpha style, 99
backgroundColor style, 99
beforeOrientation, 46
bin folder, 26
Bindable variable, 207, 209, 230, 307, 314
bindings, with SongView view, 315–317
bitmap caching, scene, 368–376
cacheAsBitmap property, 368–369
cacheAsBitmapMatrix property, 369–371
Mobile Bench application, 371–376
bitmap-based images, 353
bitmapContainer, 259
blank application option, 82–83
blinking lights, 12
Bluetooth, 4
BlurFilter, 133
BorderContainer control, 37, 60, 97
borderVisible style, 99
Bounce easer, 88
Broadcast receivers, 215, 217, 220
Browse button, 341
Browse workspace, 345
browseForImage( ) method, 263
BusyIndicator control, 97, 117–120
Button class, 148
Button elements, 138, 140, 143–144, 147, 162
ButtonBarButtons, 109
ButtonBase class, 92
buttonReleased, 110
Button's mouseDownEffect, 280
ButtonSkin1.mxml file, 146–148
ButtonSkin2.mxml, 147
bytesAvailable property, 287
cacheAsBitmap property, 368–369, 371, 378, 385
cacheAsBitmapMatrix property, 368–371, 375
caching, bitmap scene, 368–376
cacheAsBitmap property, 368–369
cacheAsBitmapMatrix property, 369–371
Mobile Bench application, 371–376
application settings and Android permissions, 250
checking for camera support, 248–249
initializing camera, 249
manipulating video stream, 251–260
capturing and saving images from, 258–260
displaying FPS counters, 257
CameraBasic-app.xml, 250
CameraRoll class, 258, 260–266
CameraRoll.supportsAddBitmapData property, 260
CameraRoll.supportsBrowseForImage property, 263
cameras
checking for support for, 248–249
initializing, 249
CameraUI class, 266–267, 335–336
Capabilities class, 11, 35, 37
Capabilities.cpuArchitecture, 425
Capabilities.os, 425
Capabilities.screenDPI, 35
capabilityScroller movie, 11
Captivate file, 341
Cascading Style Sheets (CSS), density support in, 40–43
category element, 218
caterpillar generator example, 66–70
certificate.p12, 240
certificates, code signing, 183–186
change handlers, 299
chartData, 152
chartdata element, 151
charts
2D, generating with Spark primitives, 150–164
CheckBox control, 97, 107, 369
checkpointsXMLList variable, 230
checkstore command, 186
chevron160.png file, 309
chromeColor, 87
clearAll function, 69
click handler, 334
clickHandler function, 110, 112
cloneModelForEntry function, 307
code, reducing execution time of, 364–365
Code Monkey sound effects, 283
code signing certificates, 183–186
ColorMatrixFilter, 251, 253–254
ColumnChart element, 152
com.apress.hello package, 217
com.apress.hello.HelloWorld, 217
ComboBox control, 97
command line
running applications from, 26–28
command line launch, Android SDK and AVD Manager, 168
complete event, 333
completeHandler( ) method, 233
component class, 320
components package, 414
com.proandroidflash package, 235
concurrency, 394
configurator, Flex Mobile, 16–19
connect method, 329
content property, 110
Content Providers, 214
contentBackgroundAlpha style, 99
contentBackgroundColor style, 99
ContentCache class, 382
context object, 94
BusyIndicator, 117
combined HSlider, Scroller, and BusyIndicator controls, 117–120
HSlider, 116
Scroller, 117
soft keyboard support, 104–107
ConvolutionFilter, 251, 253–254
Create Editable Copy, 345
createMusicEntryForFile, 306
creationComplete events, 76–77
creationComplete handler, 76, 248, 252
creationCompleteEffect, 280
CrossFadeViewTransition, 87
CSS (Cascading Style Sheets), density support in, 40–43
cuePoint event, 330
currentIndex property, 417, 419
currentIndex variable, 416
currentState variable, 291–292
currentTimeUpdateInterval property, 333
customization, state-based, 402–419
project-based customization, 410–416
CustomSkin.mxml, 147
data attribute, 130
data objects, session, persisting, 94–96
data property, 286, 301, 308, 337
DataGrid control, 97
DataGroup, 60
dataProvider property, 113–114, 419
dataTipFormatFunction, 116
ddWebsiteInfo( ) method, 232
deactivate event, 77
debug token, 424
Declarations element, 138, 140, 143–144, 152, 154
decorator property, 113
DEFAULT_DIR constant, 306
defaultButtonAppearance, 86–87, 425
defaultPopTransition property, 90
default.properties, 223
Definition element, 135
density
Density Explorer application, 34–39
Density Explorer application, 34–39
DensityExplorer-app.xml file, 34
DensityExplorerHomeView.mxml, 34
DensityUtil, 35
deploying, from command line, 191–193
descriptor file, applications, manually changing application permissions in, 178–179
designer-developer workflow, 339–358
visual designer's role, 340–354
developer accounts, Android Market, 194
Adobe Flash Builder 4.5, 357
Adobe Flash Professional, 355–356
Developing understanding, 355
Device Central application, 7–8, 341, 343–344, 346. See also Adobe Device Central
deviceDensity, 37
device-independent pixels, simulating, 32–33
dial button, Android Emulator, 170
digital interactive media. See rich media integration
DISABLE_KEYGUARD permission, 179
dispatchEvent( ) method, 207
DisplacementFilter, 254
DisplacementMapFilter, 251, 253
Display panel, 344
displayAsPassword property, 101
DisplayList, 367
displayNotification( ) method, 237–238
displayObject property, 247, 318, 333, 337, 368–370
Document class, 355
doNotification( ) method, 236–237
downloading Android, 214
dpi media, 42
dpi selector, 41
DraggableGroup class, 58, 60, 62
drawable-hdpi directory, 225
drawable-ldpi directory, 225
drawable-mdpi directory, 225
Eclipse IDE, 167
Eclipse-based development tool, 357
editable property, 101
effects
parallel and sequence, 139–140
Elastic Racetrack model, 363–364
Ellipse element, 123, 125, 157
embedding, SoundEffect class example, 281–283
emphasized property, 110
Emulation workspace, 344
Emulator, Android. See Android Emulator
emulator -avd command, 174
emulator executable, 175
emulator version application, using AIR Developer Tool, 189
ENTER_FRAME event, 363, 372, 374
entries collection, 307
entries property, 307
Entrypoint class, 394
ErrorEvent.ERROR, 262
Event.CANCEL, 262
Event.COMPLETE event, 262
event.data.file.url property, 263, 267
EventDispatcher, 314
Event.ID3 event, 296
event.preventDefault( ) method, 252
listeners
portrait/landscape switching in Flex with, 46–47
event.stopImmediatePropogation( ) method, 68
event.target parameter, 281
execution time, of code, reducing, 364–365
explodeRadius attribute, 155
extdir directory, 27
extract method, 294
field attribute, 155
file formats, graphic, 350–352
File menu, 349
file protocol, 295
File.applicationStorageDirectory, 306
File.documentsDirectory, 306
files, in applications, 223–227
FileStream, 306
File.userDirectory, 306
fill element, 125
fill_parent attribute, 226
filter effects, images, 252–256
filterEntriesBySong function, 417
fingersketch.jpg file, 161, 163
Fireworks. See Adobe Fireworks
firstView attribute, 301
firstViewData properties, 76
FirstView.mxml file, 74
FLA workflow, 358
Flash apps, 350
Flash Builder, 15, 358, 390. See also Adobe Flash Builder
Flash Capability Reporter application, Adobe, 10–13
Flash Platform system, Adobe. See Adobe Flash Platform system
Flash player, 4, 6. See also Adobe Flash music player
Flash Professional. See Adobe Flash Professional
Flash XML Graphics (FXG) format, 156–158, 351–352, 367
flash.display.Bitmap, 382
flash.display.Loader, 318
flash.events package, 286
flash.events.Event.COMPLETE, 284
flash.events.Event.ID3, 284
flash.events.Event.OPEN, 284
flash.events.Event.SOUND_COMPLETE, 284
flash.events.IOErrorEvent, 284
flash.events.ProgressEvent.PROGRESS, 284
flash.filesystem package, 306
flash.media.Camera class, 246, 249
flash.media.CameraRoll class, 247
flash.media.CameraUI, 247
flash.media.Video class, 247, 249
flash.sensors package, 267
Flex 4.5 SDK, 7
Flex applications, running in Android Emulator, 189–190
Flex Display Densities, 33
Flex framework (MXML), 301, 358
Flex Library Project, 411
Flex Mobile
constructing mobile UIs with, 71–96
Flex Mobile project creation wizard, 14
Flex UIComponent, 370
.flexProperties: [internal], 16
float numeric type, 393
for loop, 288
Form control, 97
FPS (frames per second), 257, 388
FPSComponent, 379
frameRate property, 371
frames per second (FPS), 257, 388
freqMultiplier variable, 288
FXG (Flash XML Graphics) format, 156–158, 351–352, 367
<fx:Script> tag, 251, 300, 329, 407
GeolocationEvent class, 273–274
GeolocationEvent.UPDATE, 273
geometric shapes, applying transformations to, 133–135
Gesture Check, 13
gesture* event, 60
GESTURE_ROTATE, 57
GESTURE_ZOOM, 57
gestures
handling
Flash scrapbook example, 56–64
get function, 417
getCamera method, 249
getCurrentSkinState function, 320
getCurrentViewState method, 404, 407
getDPIScale(sourceDPI:Number, targetDPI:Number):Number function, 35
getMusicEntries, 306
getProperty function, 95
getRuntimeDPI( ):Number function, 35
getStyle method, 41
getWedgeLabel function, 155
GIF (Graphics Interchange Format), 350–351
GlowFilter, 133
Google Account, 194
Google Android Developer Phone, 167
Google Android Market, 188, 194
GPS compass, 4
GPU (graphics processing unit), rendering, 376–378
gpu mode, 378
GradientEntry elements, 125, 132
gradients, linear and radial, 123–125
graphic clip layer, 11
Graphic element, 157
applying transformations to geometric shapes, 133–135
Elastic Racetrack model, 363–364
JPEG, 351
reducing code execution time, 364–365
cacheAsBitmap property, 368–369
cacheAsBitmapMatrix property, 369–371
Mobile Bench application, 371–376
Spark primitives
generating 2D charts and graphs with, 150–164
rendering 2D shapes with, 121–133
speeding up rendering, 365–368
Graphics Interchange Format (GIF), 350–351
graphics processing unit (GPU), rendering, 376–378
GraphicsElements, 367–368, 372–373
Group class, 58
Group container, 408
GSM telephony, 4
handlers, URI, invoking in AIR, 200–202
hang-up button, Android Emulator, 170
Hard-Coded HTML Page, 203
hardware inputs. See inputs
hello variable, 225
HelloWorld class, 216
HelloWorld.java file, 216–217, 220, 223–224
HGroup containers, 313
HGroup element, 144
hideActionBar/showActionBar, 85
HomeView, 16
horizontalAxis element, 152
horizontalCenter attributes, 163
HorizontalLayout, 408
HSlider class, 34
HTML pages
launching custom in AIR, 203–204
htmlStr variable, 204
http://developer.android.com/sdk, 167
http://java.sun.com/javase/downloads, 166
http://market.android.com/publish/ Home, 194
http://www.amazon.com/gp/mas/dl/ android?p=com.adobe.air, 197
H/VGroup classes, 16
Hypertext Markup Language pages. See HTML pages
icon style, 108
icon variable, 225
iconField, 113
iconFunction, 113
IconItemRenderer class, 113–115, 386–387
IconItemRenderers class, 309, 323
iconPlacement style, 108
icon.png file, 225
ID3 tags, reading metadata in, 295–296
ID3Data object, 318
ID3Reader class, 317
Illustrator, Adobe. See Adobe Illustrator
Image control, 97
Image element, 144
Image source, 42
images
capturing and saving from video stream, 258–260
IMetaData interface, 318
includedIn property, 48
includeIn property, 405
incrementProgramState function, 291
IndexChangeEvent, 80
init function, 19
initFilters( ) method, 252, 254
initialize event, 76, 301, 329
initialize function, 18–19, 389
input-package option, 192
application settings and Android permissions, 250
checking for camera support, 248–249
initializing camera, 249
manipulating video stream, 251–260
installing Android, 214
intent-filter element, 215, 225
InteractiveObject event, 57, 65
interface class, 303
invalidateProperties, 59
invokeMontastic( ) method, 232
ioErrorHandler( ) method, 233
iOS (Apple Operating System), 425–426
isDrag flag, 293
isPlaying flag, 297–298, 314, 320
isplayObjectContainer, 247
isPortrait variable, 404
isPrimaryTouchPoint, 67
isSong property, 304
isSupported property, 243, 249, 270
isTablet flag, 407
isTruncated property, 101
text component performance, 383–385
ItemRenderer Code, 385
itemRenderer property, 113–114, 379, 381–382
itemRendererFunction property, 379
IViewport interface, 117
Java SDK, 166
JAVA_HOME, 214
JPEG (Joint Photographic Experts Group) format, 351
JRE_HOME path, 175
Keyboard.BACK, 252
keyboards, soft, support for, 104–107
Keyboard.SEARCH, 252
Label components, 80, 99, 104, 112
Label element, 147
label property, 110
labelField, 113
labelPosition attribute, 155
Label's text property, 82
landscape state, 402
landscapeTablet state, 408
lastFPSUpdate, 373
leftPeak property, 288
life cycle, of Android, 220–221
LightweightVideoElement constructor, 333
LinearGradient element, 125, 128–129
LinearLayout element, 226
List component, 309
List control, 113
ListItemRenderers, 98
List's dataProvider, 308
load method, 284
loadCurrentSong method, 315
Loader object, 263
MainApp class, 234
MainApp.java, 234
manually permission settings, 177
mapBitmap, 255
Market, Android. See Android Market, publishing to
Math.max function, 68
maxChars property, 101
maxDisplayedLines property, 101
media, rich. See rich media integration
MediaEvent object, 263
MediaEvent parameter, 267
MediaEvent.SELECT, 262
MediaPlayer class, 333–334, 336–337
mediaSizeChange event, 333
memory usage, 388
MergedAIRApp.apk, 240
messageField, 113
messageStyleName class, 115
metadata, in ID3 tags, reading, 295–296
Metadata element, 148
metaData event, 330
Metaphile.swc file, 412
Microphone.getMicrophone( ) method, 244
minutes:seconds string, 331
mnt/sdcard directory, 306
mnt/sdcard/Music directory, 306
multitouch and gestures, 52–70
Flash scrapbook example, 56–64
performance tuning, 360
screens
Mobile Bench application, 371–376
Mobile browser, 4
mobile devices, optimizing video for, 324–325
Mobile Flash
on platforms other than Android, 2–3
mobile project, 341
MobileBenchHomeView, 371
mobileDevice profile, 26
MobileVideoPlayerSkin, 327
monitoring, APIs and tools for, 388–390
Flash Builder profiler, 390
PerformanceTest v2 Beta tool, 389–390
montastic.db, 230
month element, 151
mouse events, press and drag, 58–59
mouseDownEffect, 281
mouseEnabled property, 261
mouseEnabledWhereTransparent, 58
MouseEvent handlers, 322
Move element, 140
Move3D element, 143
MoveEffect element, 143
moveEffect.play( ) method, 143
MovieClips, 367
MP3 (MPEG–1 Audio Layer 3) files, playing, 295–299
implementing pause functionality, 296–298
reading ID3 tag metadata, 295–296
MultiDPIBitmapSource class, 34, 37, 41, 78, 310
multitasking, 4
multitouch, and gestures, 52–70
Flash scrapbook example, 56–64
Multitouch class, 4, 11, 18, 53, 55, 64
multitouch support, Android Emulator, 166
MultitouchImage class, 56, 60, 62
MultiTouch.inputMode variable, 65, 160
MultitouchInputMode.GESTURE, 57
Multitouch.supportedGestures, 55
Multitouch.supportsGestureEvents, 55
music players, Adobe Flash. See Adobe Flash music player
musicEntries collection, 417
MusicEntry class, 300, 303–304, 306–307, 309, 317
MusicService implementation, 303–306
MX Label, 384
MX Text, 384
mx.controls.Image, 382
mx.core.SoundAsset, 280
mx.effect.Effect class, 280
mx.effects package, 134
MXML (Flex framework), 301, 358
mx.utils package, 35
My_Multitouch_320x480, 345
MyAIRApp, 239
MyAnimate1, 138
MyHelloWidget, 220
MySound class, 280
name:value pair, 155
native Android integration, AIR and, 239–241
NativeApplication class, 77, 94–95
navigateToURL( ) method, 202, 283
navigationLayout, 86
navigator.poppedViewReturnedObject.object, 93
navigator.pushView function, 306, 308
needsSoftKeyboard, 104
NET_STATUS event, 330
NetStream code, 332
NetStream-based video players, 332
NetStream.Play.Complete, 331
NetworkInfo API, 179
New->MXML Skin, 146
nodebug, 26
Notification instance, 238
notifications, sending in applications, 227–238
nteractiveObject, 60
nullability, 393
NumberFormatter, 251
numeric optimizations, 393
onBind( ) method, 235
onCameraRollError( ) method, 262
onCaptureImage( ) function, 259, 267
onCaptureImage handler, 337
onChange handler function, 80, 89
onChanged event, 51
onClick handler, 297
onCreate( ) method, 216, 220–221, 234–236, 238
onCreationComplete( ) method, 244, 252, 262, 265, 267, 271
onCreationComplete handler, 287, 297
onCuePoint, 331
onDiscardImage( ) method, 259
onDurationChange handler, 334
onFilterChange handler, 252
onHTTP( ) method, 202
onID3 handler, 296
onInitialize function, 80
onInitialize handler, 301, 306, 308, 329
onLoaded callback, 263
onMetaData handler, 317–318, 331
onNetStatus handlers, 331
onPanChange, 299
onPause( ) method, 221
onPlayPause function, 331, 418
onPlayStatus handler, 331
onRestart( ) method, 221
onResume( ) method, 221
onSaveComplete( ) method, 262
onSaveImage( ) function, 259–260
onSelect( ) handler, 263
onSelectCanceled( ) method, 262
onSongEnded, 312
onStop( ) method, 221
onTimeChange handler, 335
onTouchBegin handler, 293
onTouchMove, 293
onTouchTap function, 291
onVideoComplete handler, 335, 337
onViewActivate function, 404, 407
onViewDeactivate handler, 329, 334
onVolumeChange, 299
Open Source Media Framework (OSMF), 332–335
optimizing, video for mobile devices, 324–325
orientation, of screens, 43–52
portrait/landscape switching in Flex, 44–48
rotating smiley flash example, 50–52
OSMF (Open Source Media Framework), 332–335
OSMF MediaElement, 333
OSMF MediaPlayer class, 333, 336
OSMFVideoView code, 332, 334, 337
overSample value, 288
overSample variable, 288
package command, 192
Package Explorer tab, 414
-package option, 191
packaging applications, 194–195
pan property, 299
panEasingFunction property, 283
Panel control, 97
parallel animation effects, 139–140
Parallel element, 140
parentApplication, 37
partAdded function, 320
partRemoved function, 320
PATH environment variable, 175
pausePosition variable, 297–298, 316
peak memory usage, 388
people.db, 210
percentageComplete, 316
percentComplete property, 313, 315–316, 320, 323
concurrency, 394
faster ActionScript language performance, 393–394
faster garbage collection, 391–392
threaded render pipeline, 395–396
Elastic Racetrack model, 363–364
reducing code execution time, 364–365
speeding up rendering, 365–368
text component performance, 383–385
mobile, 360
monitoring APIs and tools, 388–390
Flash Builder profiler, 390
PerformanceTest v2 Beta tool, 389–390
perceived vs. actual performance, 360–362
PerformanceTest v2 Beta tool, 389–390
permissions
Android, 250
setting initial permissions in Adobe Flash Builder, 177–178
PersistenceManager class, 94–96
persisting, View and session data objects, 94–96
persistNavigatorState, 96
person_table, 211
PhotoCollageHomeScript.as file, 266
photoContainer, 263
Photoshop, Adobe. See Adobe Photoshop
physicalDPI, 38
PieChart element, 155
pipelines, threaded render, 395–396
pixels, simulating device-independent, 32–33
platforms, Adobe Flash system. See Adobe Flash Platform system
platform-tools directory, 171
play( ) method, 284, 286, 292, 298
PlayBook directory, 421
PlayBook tablet, porting to, 421–425
playEffect method, 281
player.displayObject, 337
PlayPauseButtonSkin, 328
playSong utility methods, 316
playSongAtCurrentIndex function, 417–418
playStatus, 330
PNG–24 (Portable Network Graphics), 350–352
popAll, 85
poppedViewReturnedObject.context property, 94
popToFirstView, 85
Popular Android Tablets, 401
popView, 85
Portable Network Graphics (PNG–24), 350–352
porting to PlayBook tablet, 421–425
portrait rotation, 48
portrait View state, 402
portrait/landscape orientation switching, in Flex, 44–48
with states, 48
portraitTablet state, 409
prepare command, 192
Presentation Model pattern, 300–301
press and drag mouse events, 58–59
profilers, Flash Builder, 390
ProgressButton control, 313, 319, 414
.project: [internal], 16
project-based customization, 410–416
<project-name>-app.xml file convention, 179
projects, creating new, 10, 13–16
prompt property, 101
PropertyChangeEvent, 317
publishing
from Adobe Flash Professional, 187–188
developer account, 194
packaging application, 194–195
uploading Adobe AIR application, 195–196
push mode, 87
pushView function, 62, 74, 84, 93
RadioButtons, 107
receiver elements, 215
receivers, Broadcast, 220
recorded sound, playing. See sound, playing recorded
recordedBytes array, 287–288, 292
Rect element, 122–123, 125, 149, 157
RectEllipse1 element, 157
RectEllipse1.fxg file, 156–157
refreshDataGrid( ) method, 210–211, 232
remove( ) method, 232
removeAll( ) method, 232
removePerson( ) method, 209, 211
render pipelines, threaded, 395–396
text component performance, 383–385
rendering
2D shapes, with Spark primitives, 121–133
linear and radial gradients, 123–125
path element example, 130
rectangles and ellipses, 122–123
Reparent tag, 48
repeatBehavior, 143
repeatCount attribute, 143–144
repeatDelay style, 109
repeatInterval style, 109
requestSoftKeyboard( ) method, 104
Reset Browse option, 345
resize event, 407
res/layout directory, 225, 227
resolution, of screens, vs. density, 31–32
resources element, 226
restrict property, 101
res/values subdirectory, 225
rich media integration, 279–338
Adobe Flash music player, 294–323
optimizing for mobile devices, 324–325
Spark VideoPlayer component, 325–328
VideoRecorder example application, 335–338
sound
RichEditableText control, 98–99, 384
rightPeak property, 288
R.java, 223
root-dir, 27
rootPath string, 306
Rotate element, 140
rotate gestures, handling, 56–57
Rotate3D element, 143
rotateEffect.play( ) method, 144
rotating smiley flash example, 50–52
rotationInterval, 117
run( ) method, 236
Adobe Flash Player, 5
Adobe Flex SDK, 7
AIR, 6
runtimes/air/android/emulator/Runtime.apk file, 171
SAMPLE_DATA event, 245
sampleData handler, 294
SampleDataEvent.SAMPLE_DATA event, 245
Save for Web and Devices option, 349
saveImageToFileSystem, 161
saving images from video stream, 258–260
scaleXBy attribute, 144
scaling, screens of tablets, 399–401
cacheAsBitmap property, 368–369
cacheAsBitmapMatrix property, 369–371
Flash Mobile Bench application, 371–376
screens
portrait/landscape switching in Flex, 44–48
rotating smiley flash example, 50–52
simulating device-independent pixels, 32–33
screenshots, of app, 196
screensize, 27
Scroller drag operation, 118
sdks/<version> directory, 171
selectable property, 101
selected property, 110
selected state, 19
selectedIndex property, 416, 419
selectionActivePosition property, 101
selectionAnchorPosition property, 101
sequence animation effects, 139–140
Sequence elements, 140
Service class, 216
service elements, 215
session data objects, persisting, 94–96
setCurrentState function, 407
setElementIndex function, 58
setFocus( ) method, 104
setMode method, 249
setRequestedUpdateInterval( ) method, 270–271, 273
setSilenceLevel( ) method, 245
settings, applications, 250
.settings: [internal], 16
setUseEchoSuppression( ) method, 245
Shape layers, 347
shapes, geometric, applying transformations to, 133–135
Shared Library Project, 413
showDataTip, 116
showMessage( ) function, 244, 265
showRedrawRegions, 369
showTruncationTip property, 101
<s:IconItemRenderer> tag, 309
signing certificate
using AIR Developer Tool, 185–186
using Flash Professional, 183–184
sketching program example, 158
SkinnablePopupContainer, 83
skins, creating with Spark primitives, 146–149
slideDuration style, 116
<s:navigators> tag, 78
soft keyboards, support for, 104–107
softKeyboardActivating event, 104
softKeyboardDeactivate events, 105
SolidColorStroke element, 122, 125
SONG_ENDED event, 314
SongListView view, 300, 306–309
SongListView.mxml file, 414
SongView interface, 310, 312, 315, 321, 407, 416
SongView MXML file, 418
integrating Metaphile library, 317–318
two-way bindings with, 315–317
SongViewModel class, 314–315, 404, 419
SongView.mxml file, 414
sound
generating sound data, 286–288
handling state transitions, 289–294
Sound class, 283–284, 294–295, 317
SoundChannel class, 283–284, 288, 296, 298
soundComplete event, 292, 297–298
Sound.play method, 284, 297–299
SoundTransform object, 283–284, 298–299, 316
soundTransform property, 284, 299
source attribute, 251, 281–282, 300
Source-level debugging, 356
Spark graphics library, 365
Spark primitives
parallel and sequence, 139–140
generating 2D charts and graphs with, 150–164
sketching program example, 158
using FXG with Spark primitives, 156–158
rendering 2D shapes with, 121–133
linear and radial gradients, 123–125
path element example, 130
rectangles and ellipses, 122–123
Spark VideoPlayer component, 325–328
spark.components.Button, 146
spark.components.Image, 382
spark.effects package, 134
spark.filters package, 131
Spinner control, 98
sqlconn variable, 210
sqlError( ) method, 233
SQLite database, accessing in AIR, 208–211
SQLite1HomeView.mxml, 209
SQLiteAccess.as, 209
sqlstmt variable, 210
src folder, 16
stageInit function, 46
StageOrientationEvent, 46
StageWebViewExample( ) method, 206–207
StageWebViewLaunch.as, 206
stand-alone Flex/ActionScript applications, 357
startService( ) method, 235
state groups, state-based customization using, 403–410
state transitions, handling, 289–294
state-based customization, 402–419
project-based customization, 410–416
states, portrait/landscape switching in Flex with, 48
states element, 148
StatusChange event, 274
StatusChange.STATUS, 274
StatusEvent.STATUS, 270
stickyHighlighting property, 110
string element, 226
String.indexOf, 364
stroke element, 122, 125, 129, 132
stroke-width attribute, 122
StyleableTextComponent, 386
StyleableTextField class, 99, 104, 113, 384–385
<s:ViewNavigatorApplication> tag, 301
SWF delegation, 394
swipe gestures, handling, 59–60
symbolColor style, 109
System.gc( ) method, 392
SystemIdleMode API, 179
TabBar control, 98
TabbedViewNavigatorApplication option, 77–82
porting to PlayBook tablet, 421–425
state-based customization, 402–419
project-based customization, 410–416
target attribute, 144
targetImg, 144
television (TV), transitioning to, 420–421
Templates tab, 10
TestServiceApp.java class, 235
TestService.java class, 234
text attribute, 226
text components, performance, 383–385
Text Devices panel, 341
text label properties, 354
text property, 101
textAlpha style, 109
TextArea component, 103
TextArea control, 98, 105, 384
textDecoration style, 100, 109
textIndent style, 100
TextInput control, 82, 98, 103, 384
textShadowAlpha style, 109
textShadowColor style, 109
TextView element, 227
this.height, 249
this.width, 249
threaded render pipelines, 395–396
Timer event, 363
title attribute, 407
titleAlign property, 86–87, 425
titleContent, 86
titleLayout, 86
ToggleButton control, 98, 328, 331, 334
togglePlayPause function, 322
toolboxes for developers, 355–358
Adobe Flash Builder 4.5, 357
Adobe Flash Professional, 355–356
Adobe Flash Builder software, 8
Adobe Flash Catalyst platform, 9
Adobe Flash Professional software, 8
Device Central application, 8
workflow, 9
Flash Builder profiler, 390
PerformanceTest v2 Beta tool, 389–390
TOUCH_BEGIN constant, 65
TOUCH_END constant, 65
TOUCH_MOVE constant, 65
TOUCH_OUT constant, 65
TOUCH_OVER constant, 65
TOUCH_POINT constant, 65
TOUCH_ROLL_OUT constant, 65
TOUCH_ROLL_OVER constant, 65
TOUCH_TAP constant, 65
touchAnchor variable, 293
touchDelay style, 109
touchEnd( ) function, 160
touchMode, 55
touchMove function, 161
touchMoveCount, 160
touchMoveHandlerImage function, 161, 163
touchOver/Out events, 66
touchRollOver event, 66
touchSingleTap, 161
touchSingleTapCount, 161
touchTapHandler function, 161
touchTapHandlerImage function, 161, 163
trace( ) function, 264
trace messages, 265
transformations, applying to geometric shapes, 133–135
transformer1, 140
TransformGestureEvent, 57
transitionControlsWithContent property, 90
transitions
transitionToPlayingState function, 292
transitionToReadyToPlayState, 292
transitionToRecordingState function, 292
transitionToStoppedState function, 292
try/catch block, 236
tuning, performance. See performance tuning
TV (television), transitioning to, 420–421
two-finger-tap event listener, 60–61
two-way bindings, with SongView view, 315–317
type-based optimizations, 393
typicalText property, 101
UIComponents, 247–248, 258, 261, 328–329, 367–368
UIs (User Interfaces), mobile, 71–96
URI (Uniform Resource Identifier) handlers, invoking in AIR, 200–202
URLResource, 333
USB connectivity, Windows users, 167
useDuration attribute, 281
User Interfaces (UIs), mobile, 71–96
UserGroupRenderer, 379
User-Specified URL, 205
value property, 116
Vector datatype, 364
Vector.<float>, 393
verticalCenter attributes, 163
VerticalLayout, 408
VGroup element, 34, 60, 147, 157, 409, 418
optimizing video for mobile devices, 324–325
Spark VideoPlayer component, 325–328
VideoRecorder example application, 335–338
Video display object, 328, 330, 332
video stream, manipulating, 251–260
capturing and saving images from, 258–260
displaying FPS counters, 257
VideoRecorder example application, 335–338
View class, 59, 247, 290, 300–301, 306–307, 314
View objects
ViewNavigator container and, 84–92
animated View transitions, 87–90
View states, 418
View transitions, animated, 87–90
viewActivate event, 407
View-Based Application template, 15
viewDeactivate event, 77, 94, 329
View.initialize method, 37
ViewNavigator container, and View objects, 84–92
animated View transitions, 87–90
ViewNavigator pop functions, 94
ViewNavigatorApplication, 73–74, 85–87, 301–302, 371, 409, 414
ViewNavigators class, 72–73, 80, 82–83, 85, 88, 93–94, 96
views package, 414
views.FirstView, 74
ViewTransitionBase class, 88
BusyIndicator, 117
HSlider, 116
sample with combined HSlider, Scroller, and BusyIndicator controls, 117–120
Scroller, 117
soft keyboard support, 104–107
creating new document from, 341–343
previewing content in, 343–344
JPEG, 351
volume, adjusting for MP3 files, 298–299
volume property, 299
volumeEasingFunction, 282
volumeFrom attribute, 282
volumeTo attribute, 282
VSlider control, 98
WAKE_LOCK permission, 179
webView variable, 207
width.portraitPhone, 403
Wi-Fi, 5
workflow, 9
WorldView, 81
wrap_content attribute, 226
writeFloat, 288
XML action element, 218
XML Button element, 209
XML Group element, 162
XML-based format, 351, 353, 358
zoom gestures, handling, 56–57
ZoomViewTransition, 87
18.191.235.176