Programming Flex 2: The comprehensive guide to creating rich media applications with Adobe Flex

Free Download

Authors:

Edition: 1

ISBN: 9780596526894, 059652689X

Size: 3 MB (3540637 bytes)

Pages: 504/504

File format:

Language:

Publishing Year:

Category:

Chafic Kazoun, Joey Lott9780596526894, 059652689X

Is there an easier way to build and deliver rich internet applications (RIAs) other than the Flash IDE or Ajax? Absolutely. With Adobe Flex 2, the Flex 2 SDK, and this book, you have all you need to build RIAs. Programming Flex 2 offers you plenty of practical and useful examples that reveal how and why to use a particular feature of Flex 2, and when and when not to.As part of the Adobe Developer Library, Programming Flex 2 is the authoritative guide to this new Adobe framework. You learn to use a markup language called MXML and a vast library of off-the-shelf and highly-configurable components to build Flash-based applications that combine the immediacy of the Web with the functionality and responsiveness of desktop applications. You also discover why – with the Flash Player runtime environment and the powerful ActionScript 3.0 programming language – the possibilities with Flex 2 are nearly limitless.

Table of contents :
Programming Flex 2……Page 1
Table of Contents……Page 6
This Shouldn’t Be Too Hard……Page 12
Maybe We Need a Different Approach……Page 13
Flex, Take 2……Page 14
Flex Builder 2……Page 15
ActionScript 3……Page 16
Taking Another Look at Flash……Page 17
Programming Flex 2……Page 18
Looking Ahead……Page 19
Preface……Page 22
How This Book Is Organized……Page 23
What You Need to Use This Book……Page 25
Comments and Questions……Page 26
Acknowledgments……Page 27
From Joey……Page 28
Flash Player……Page 30
The Flex Framework……Page 32
Integrating with Data Services……Page 34
MXML……Page 35
Working with Data Services (Loading Data at Runtime)……Page 36
Understanding the Differences Between Traditional (HTML) and Flex Web Applications……Page 38
Understanding How Flex Applications Work……Page 39
Understanding Flex and Flash Authoring……Page 40
Summary……Page 41
Using Flex Tool Sets……Page 42
Creating Projects……Page 44
Creating an SDK project……Page 45
Creating a Flex Builder 2 project……Page 46
Building Applications……Page 48
Compiling Using mxmlc……Page 49
Specifying source paths……Page 50
Setting metadata……Page 51
Storing compiler settings in configuration files……Page 52
Using Ant……Page 55
Compiling Using Flex Builder……Page 58
Publishing Source Code……Page 59
Flash Player Security……Page 60
Understanding HTML Wrappers……Page 62
Using SWFObject……Page 63
Using Runtime Shared Libraries……Page 64
Creating Runtime Shared Libraries with the Command-Line Compilers……Page 65
Using compc……Page 66
Compiling an application using a runtime shared library……Page 68
Using Ant to build runtime shared library applications……Page 69
Linking an application to a library……Page 70
Summary……Page 71
XML encoding……Page 72
Applications and components……Page 73
Understanding namespaces……Page 75
Components……Page 76
Setting component properties……Page 77
Making MXML Interactive……Page 79
Handling Events……Page 80
Summary……Page 81
ActionScript……Page 82
Inline ActionScript……Page 83
MXML Scripts……Page 85
MXML and ActionScript Correlations……Page 86
Understanding ActionScript Syntax……Page 87
Understanding Packages……Page 88
Import statements……Page 89
Variables and Properties……Page 90
Methods……Page 93
Expressions……Page 97
Statements……Page 98
Arrays……Page 99
Objects……Page 100
Inheritance……Page 101
Interfaces……Page 102
Handling Events……Page 103
Handling Synchronous Errors……Page 105
Using XML……Page 107
Creating XML Objects……Page 108
Reading XML Data……Page 109
Writing to and Editing XML Objects……Page 110
Reflection……Page 111
Class Introspection……Page 112
Summary……Page 114
Understanding the Flex Application Life Cycle……Page 115
Differentiating Between Flash Player and Framework……Page 117
Bootstrapping Flex Applications……Page 118
Loading One Flex Application into Another Flex Application……Page 119
Understanding Application Domains……Page 121
Understanding the Preloader……Page 123
Summary……Page 124
Flex Layout Overview……Page 125
Working with Children……Page 127
Container Types……Page 129
Box-based layout……Page 131
Canvas-based layout……Page 133
Additional layout rules……Page 136
Padding, Borders, and Gaps……Page 141
Nesting Containers……Page 142
Handling Scrolling and Clipping……Page 143
The Spacer Component……Page 144
Making Fluid Interfaces……Page 145
Putting It All Together……Page 146
Summary……Page 149
Working with UI Components……Page 150
Understanding UI Components……Page 151
Common UI Component Properties……Page 152
Handling events with MXML……Page 154
Handling events with ActionScript……Page 155
Standard Flex component events……Page 156
Buttons……Page 157
Value Selectors……Page 158
Text Components……Page 159
List-Based Controls……Page 160
Creating a Collection Object……Page 162
Setting the Data Provider……Page 163
Using data providers……Page 164
Using Tree Controls……Page 165
Working with Selected Values and Items……Page 168
Understanding Menus……Page 169
Using PopUpButton……Page 170
Listening to Menu Events……Page 171
Accordion Controls……Page 172
Option Bars……Page 173
View Stacks……Page 174
Control Bars……Page 176
Summary……Page 178
Adding Tool Tips……Page 179
Applying Styles to Tool Tips……Page 181
Customizing Tool-Tip Settings……Page 182
Applying Effects……Page 183
Using Alerts……Page 185
Creating a Pop-Up Window……Page 188
Removing a Pop-Up Window……Page 189
Custom Pop-Up Component Types……Page 190
Cursor Management……Page 191
Drag and Drop……Page 193
Using Built-In Drag and Drop Features……Page 194
Understanding Drag and Drop Events……Page 196
Custom Drag and Drop Operations……Page 199
Customizing List-Based Controls……Page 201
Drop-In Item Renderers……Page 202
Inline Item Renderers……Page 204
Custom Components as Item Renderers……Page 206
Creating Item Editors……Page 209
Controlling Tab Order……Page 212
Programmatically Controlling Focus……Page 214
Responding to Keyboard Events……Page 215
Summary……Page 217
Overview……Page 218
Supported Media Types in Flex……Page 219
Adding Media……Page 220
Loading Media……Page 221
Embedding media with MXML……Page 223
Embedding media with ActionScript……Page 224
Working with Graphics……Page 226
Adding graphics……Page 227
Scaling graphics using a scaling grid (a.k.a. Scale-9)……Page 228
Working with SWF libraries……Page 231
Working with SWF animations……Page 232
Adding a sound effect……Page 234
Advanced sound control……Page 235
Working with video……Page 237
Streaming media……Page 238
Summary……Page 239
Creating States……Page 240
Applying States……Page 241
Defining States Based on Existing States……Page 242
Adding and Removing Components……Page 243
Setting Properties……Page 245
Setting Styles……Page 246
Using ActionScript to Define States……Page 247
Adding Overrides……Page 248
Adding and Removing Child Elements……Page 249
Using Dynamic States……Page 250
Managing Object Creation Policies (Preloading Objects)……Page 257
Handling State Events……Page 259
Summary……Page 260
Using Effects……Page 261
Working with Effects……Page 262
Manually playing effects……Page 263
Using triggers……Page 266
Effect Events……Page 268
Composite Effects……Page 270
Pausing, Resuming, and Reversing Effects……Page 271
Customizing Animation Easing……Page 272
Creating Custom Effects……Page 273
Defining an Effect Instance Class……Page 274
Defining an Effect Factory Class……Page 275
Using Custom Effects……Page 276
Creating Tween Effects……Page 277
Creating Transitions with MXML……Page 280
Creating Transitions with ActionScript……Page 283
Using Transition Filters……Page 284
Creating Custom Transitions……Page 285
Summary……Page 286
Using Data Models……Page 287
Creating tag-based model structures……Page 288
Populating a model from a file……Page 289
Referencing model data……Page 290
Specifying XML structure with tags……Page 292
Referencing XML data……Page 293
Using ActionScript Classes……Page 294
Curly braces……Page 297
……Page 300
BindingUtils……Page 302
Enabling Data Binding for Custom Classes……Page 306
Customizing Data Binding……Page 308
Controlling Images……Page 309
Working with Web Services……Page 310
Building Data Binding Proxies……Page 313
Using Data Binding with a Shared Object……Page 314
Summary……Page 316
Validating User Input……Page 317
Validator basics……Page 318
Handling validator events……Page 320
Triggering validators……Page 326
NumberValidator……Page 331
DateValidator……Page 332
EmailValidator……Page 333
CreditCardValidator……Page 334
RegExpValidator……Page 335
Writing Custom Validators……Page 336
Formatting Data……Page 337
NumberFormatter……Page 338
DateFormatter……Page 339
PhoneFormatter……Page 340
Writing Custom Formatters……Page 341
Summary……Page 343
Customizing Application Appearance……Page 344
Style Value Formats……Page 345
Instance Styles……Page 346
Using CSS……Page 347
Using StyleManager……Page 350
Working with Fonts……Page 352
Device fonts……Page 353
Embedded fonts……Page 354
Embedding font subsets……Page 358
Using FlashType……Page 360
Applying Skins……Page 362
Setting graphical skins with setStyle……Page 363
Using Scale-9……Page 364
Programmatic Skinning……Page 366
Skinning Application Backgrounds……Page 371
Skinning Tool Tips……Page 372
Customizing the Preloader……Page 373
Themes……Page 377
Creating a Theme……Page 378
Runtime CSS……Page 380
Summary……Page 383
Client Data Communication……Page 384
Basic Local Connection Communication……Page 385
Cross-Domain Communication……Page 388
Persistent Data……Page 389
Reading and Writing to Shared Objects……Page 390
Using Local Shared Objects……Page 393
Customizing Serialization……Page 397
Working with ExternalInterface……Page 403
Setting the Web Browser Status……Page 404
Integrating HTML and Flex Forms……Page 405
Summary……Page 408
Remote Data Communication……Page 409
Understanding Strategies for Data Communication……Page 410
Working with Request/Response Data Communication……Page 411
Sending requests……Page 412
Handling results……Page 413
Sending parameters……Page 415
Using HTTPService with ActionScript……Page 417
URLLoader……Page 420
Handling responses……Page 421
Sending parameters……Page 422
Using URLLoader in a remote proxy……Page 423
Web Services……Page 424
Handling results……Page 425
Sending parameters……Page 426
Sending requests……Page 429
Handling results……Page 430
Using WebService with a remote proxy……Page 431
Flash Remoting……Page 432
Creating Flash Remoting connections……Page 433
Using Flash Remoting remote proxies……Page 434
Real-Time/Socket Connection……Page 435
Downloading Files……Page 436
Summary……Page 437
The Flash Debug Player……Page 438
Runtime Errors……Page 439
The Debugging API……Page 440
Using Show Redraw Regions……Page 441
Using FDB……Page 442
Debugging with Flex Builder 2……Page 443
Remote Debugging……Page 447
Logging Using trace() Within an Application……Page 448
The Logging Framework……Page 450
Defining a Custom Target……Page 452
Debugging with the Flex Logging Framework……Page 454
Summary……Page 455
Application Components……Page 456
The Importance of Application Components……Page 457
MXML Component Basics……Page 458
Creating and Using a Component……Page 459
Adding and Laying Out Controls……Page 461
Understanding Interaction……Page 462
Defining component properties……Page 463
Defining component methods……Page 466
Defining component events……Page 467
Component Styles……Page 469
Internal States……Page 470
Summary……Page 472
Component Framework Overview……Page 473
Component Life Cycle……Page 475
Construction……Page 476
Invalidation……Page 477
Component Implementation……Page 478
Implementing the Constructor……Page 479
Implementing createChildren()……Page 480
Understanding Invalidation……Page 481
Implementing commitProperties()……Page 483
Implementing measure()……Page 484
Implementing updateDisplayList()……Page 485
Adding Custom Properties and Events……Page 486
Adding Styling Support……Page 489
Summary……Page 491
Index……Page 492

Reviews

There are no reviews yet.

Be the first to review “Programming Flex 2: The comprehensive guide to creating rich media applications with Adobe Flex”
Shopping Cart
Scroll to Top