Flex 3 in action

Free Download

Authors:

ISBN: 1-933988-48-7

Size: 13 MB (13335938 bytes)

Pages: 579/579

File format:

Language:

Publishing Year:

Ahmed, Tariq1-933988-48-7


Table of contents :
Cover……Page 1
Contents……Page 9
Application Basics……Page 35
Introduction to Flex……Page 37
1.2 Prolific, but at a price……Page 38
1.3.1 They all want it all……Page 39
1.4 The RIA contenders……Page 40
1.4.2 Silverlight by Microsoft……Page 41
1.5 Flex vs. web applications……Page 42
1.5.2 The role of browsers as transfer stations and document renderers……Page 43
1.5.4 Cross-platform issues……Page 44
1.5.6 AJAX communication limits……Page 45
1.5.7 Apples and oranges……Page 46
1.6.1 Taking advantage of Adobe Flash……Page 47
1.6.2 Flex and JavaScript can play together……Page 48
1.6.3 The Flex ecosystem……Page 49
1.6.4 How Flex works……Page 50
1.6.5 Events, events, events……Page 52
1.7 What’s new in Flex 3……Page 53
1.8 Summary……Page 54
Getting started……Page 55
2.1.1 Setting up the compile environment……Page 56
2.1.2 Setting up the editing environment……Page 58
2.1.3 Next steps (if you’re still interested)……Page 59
2.2.1 Product and pricing matrix……Page 60
2.3 Exploring Flex Builder……Page 61
2.4.1 Out-of-the-box perspectives……Page 63
2.4.3 Customizing perspectives……Page 64
2.5.1 Create the project……Page 65
2.5.4 Making it real……Page 67
2.6 Using design mode……Page 68
2.7 Built-in help……Page 69
2.7.2 Accessing the API Reference……Page 70
2.7.3 Perusing API Reference……Page 71
2.8.1 The structure of MXML……Page 72
2.8.2 How MXML and ActionScript relate……Page 73
2.8.3 Events are handled by ActionScript……Page 74
2.9 Summary……Page 76
Working with ActionScript……Page 77
3.2 Variables……Page 78
3.2.4 Primitive and complex data types……Page 79
3.3 Loops……Page 82
3.3.2 For (property names in array/object)……Page 83
3.3.4 While (condition)……Page 84
3.4.1 If..else……Page 85
3.4.2 Switch……Page 87
3.5 Arrays……Page 88
3.5.1 Indexed arrays……Page 89
3.5.2 Associative arrays……Page 91
3.6.1 Braces……Page 92
3.6.2 Logical operators and shortcuts……Page 93
3.7 Sneak peek at functions, classes, and packages……Page 95
3.7.1 Your own functions……Page 96
3.7.2 Separating ActionScript to individual files……Page 99
3.8.1 Once again, it is about events……Page 100
3.8.2 Bidirectional binding……Page 101
3.9 Summary……Page 102
Layout and containers……Page 103
4.1 Absolute layout……Page 104
4.2.1 Basic constraints……Page 106
4.2.2 Enhanced constraints……Page 108
4.3 Automatic layout……Page 113
4.4.2 Fixed Sizing……Page 115
4.5.1 Application container……Page 116
4.5.2 Canvas container……Page 117
4.5.3 Box, HBox, and VBox containers……Page 118
4.5.4 Panel container……Page 119
4.5.6 DividedBox, HDividedBox, and VDividedBox containers……Page 120
4.5.8 Grid container……Page 122
4.5.9 Tile container……Page 123
4.6.1 dataProvider sneak peek……Page 124
4.6.2 Properties and events of a Repeater……Page 125
4.6.3 Creating the Repeater……Page 126
4.6.4 Working with Repeater events……Page 127
4.7 Summary……Page 129
Displaying forms and capturing user input……Page 130
5.2 Text controls……Page 131
5.3 Date controls……Page 133
5.4 Numeric controls……Page 134
5.5 Buttons……Page 136
5.5.2 The PopUpButton and PopUpMenuButton……Page 138
5.6 Picklist controls……Page 141
5.7.2 Passing events to a function……Page 143
5.7.3 Accessing properties directly……Page 145
5.8 Summary……Page 146
Validating user input……Page 147
6.1 Overview of validation……Page 148
6.2.1 Validator……Page 149
6.2.2 StringValidator……Page 151
6.2.3 NumberValidator……Page 152
6.2.4 DateValidator……Page 154
6.2.5 EmailValidator……Page 157
6.2.6 CreditCardValidator……Page 159
6.2.7 CurrencyValidator……Page 161
6.2.8 PhoneNumberValidator……Page 163
6.2.9 RegExpValidator……Page 164
6.2.10 SocialSecurityValidator……Page 166
6.2.11 ZipCodeValidator……Page 167
6.3 Real-time validation……Page 168
6.5 Pass-through validation……Page 169
6.6 Scripted validation……Page 170
6.7.3 Controlling what triggers validation……Page 171
6.8 Summary……Page 172
Formatting data……Page 173
7.1.1 Formatter……Page 174
7.1.2 NumberFormatter……Page 175
7.1.3 CurrencyFormatter……Page 177
7.1.4 DateFormatter……Page 178
7.1.5 PhoneFormatter……Page 180
7.1.6 ZipCodeFormatter……Page 182
7.1.7 SwitchSymbolFormatter……Page 183
7.3.1 Using a function with a formatter component……Page 185
7.3.2 Using a function with a formatter class……Page 186
7.4 Working with formatting errors……Page 187
7.5 Summary……Page 188
8.1 List genealogy……Page 189
8.1.1 ListBase and AdvancedListBase’s properties……Page 190
8.1.2 ListBase events……Page 191
8.2.1 Feeding the dataProvider……Page 192
8.3 Initializing collections……Page 193
8.4 Populating collections……Page 194
8.4.1 List……Page 195
8.4.2 HorizontalList……Page 197
8.4.3 TileList……Page 198
8.4.4 DataGrid……Page 199
8.4.5 Tree……Page 203
8.4.6 AdvancedDataGrid……Page 206
8.5 Interacting with lists……Page 212
8.5.2 Passing the event to a function……Page 213
8.5.3 Passing data to a function……Page 215
8.5.5 Binding to a selected row……Page 216
8.6 Summary……Page 217
9.1 Label functions……Page 218
9.1.1 Types of label functions……Page 219
9.1.2 Using a single-column label function……Page 220
9.1.3 Using a multicolumn label function……Page 221
9.2 Item renderers……Page 222
9.2.2 Creating a (regular) item renderer……Page 223
9.2.3 Adding logic to an item renderer……Page 224
9.2.5 Using drop-in item renderers……Page 227
9.3.1 Enabling item editing……Page 229
9.3.2 Creating an item editor……Page 230
9.3.3 Item-editing events……Page 232
9.4 Combining an item editor and item renderer……Page 238
9.5.1 The AdvancedDataGridRendererProvider……Page 239
9.5.2 Referencing the column……Page 240
9.5.3 Spanning columns……Page 241
9.5.4 Spanning an entire row……Page 242
9.6 Filter functions……Page 243
9.7 Summary……Page 245
Application flow and structure……Page 247
Events……Page 249
10.1.1 Event system-the Postal Service……Page 250
10.1.2 Event-delivery system……Page 251
10.1.3 Set your phases on stun……Page 252
10.2.1 Adding event listeners……Page 253
10.2.2 Keying into binding events……Page 255
10.2.3 Removing event listeners……Page 257
10.3.1 Using the dispatcher to send an event……Page 260
10.3.2 Creating custom events……Page 261
10.3.3 Stopping event propagation……Page 264
10.3.4 Adding event metadata to components……Page 265
10.4 Summary……Page 266
Application navigation……Page 267
11.1.1 Nested arrays……Page 268
11.1.3 Models……Page 269
11.1.4 XML component and class……Page 270
11.1.5 XMLList component……Page 271
11.1.6 XMLListCollection component and class……Page 272
11.2.1 Creating a menu……Page 274
11.2.3 Customizing menu items……Page 276
11.3 Using a menu bar……Page 280
11.3.1 Creating a menu bar……Page 281
11.3.3 Customizing items in the menu bar……Page 282
11.3.4 Handling user interactions with menu bars……Page 283
11.4.1 Creating a view stack……Page 285
11.4.2 Adding navigation to the view stack……Page 287
11.4.3 Determining which stack is selected……Page 288
11.4.4 Handling user interactions with view stacks……Page 289
11.5 TabNavigator……Page 291
11.5.2 Handling user interactions with a tab navigator……Page 292
11.6.1 Creating an accordion……Page 294
11.6.2 Populating an accordion……Page 295
11.7 Summary……Page 296
12.1 Creating your first pop-up……Page 297
12.1.2 Using PopUpManager to open the window……Page 298
12.2.1 Using the centerPopUp() method……Page 300
12.2.2 Calculating window placement……Page 301
12.3 Setting window transparency……Page 304
12.4 Data integration with pop-ups……Page 305
12.4.2 Sending events……Page 307
12.4.3 Getting data out……Page 308
12.4.4 Sending data to the window……Page 309
12.5.2 Doing more with alerts……Page 310
12.5.3 A more advanced alert……Page 311
12.5.4 Pimp this alert……Page 312
12.6 Summary……Page 314
13.1 Understanding view states……Page 315
13.2 View states in Flex……Page 316
13.2.1 View states classes……Page 318
13.2.2 View-state example……Page 319
13.2.3 Defining a view state ()……Page 321
13.2.4 View-state transitions……Page 323
13.2.5 States in components……Page 325
13.3 Summary……Page 327
Working with data services……Page 328
14.2.1 Reading the WSDL document: operations……Page 329
14.2.2 Reading the WSDL: input types……Page 330
14.2.3 Reading the WSDL document: output……Page 331
14.3 Using WebService components……Page 332
14.3.2 Calling the WebService component……Page 334
14.3.4 The ResultEvent……Page 335
14.3.5 Working with the result……Page 336
14.3.6 Fault events……Page 337
14.3.7 Using asynchronous tokens……Page 338
14.4 Using HTTPService to retrieve results……Page 339
14.4.1 Connecting to an HTTP web service……Page 340
14.4.2 Explicit parameter binding……Page 341
14.5 Using the RemoteObject tag……Page 342
14.6 Using the URLLoader……Page 344
14.7 Using the Flex Import Web Service wizard……Page 345
14.7.1 Using the Import Web Service wizard……Page 346
14.7.2 Working with generated web-service code……Page 347
14.8 Summary……Page 349
15.1 XML primer……Page 350
15.1.2 Benefits of XML……Page 351
15.1.4 Syntax and rules……Page 352
15.1.5 DTDs and XML Schema……Page 355
15.1.6 Namespaces……Page 356
15.2.1 The XML component……Page 357
15.2.2 The XML class……Page 358
15.2.4 The XMLList class……Page 363
15.2.5 The XMLListCollection component and class……Page 364
15.3 Loading external XML source data……Page 365
15.4.2 Binding to XML……Page 366
15.5 ECMAScript for XML (E4X)……Page 367
15.5.1 E4X syntax……Page 368
15.5.2 Working with XML structure……Page 369
15.6 Summary……Page 373
Objects and classes……Page 374
16.1.2 Objects have properties and methods……Page 375
16.1.3 Inheritance……Page 376
16.1.4 Encapsulation and coupling……Page 377
16.2.1 A closer look at objects……Page 378
16.2.2 Methods of objects……Page 379
16.3 Creating a class……Page 380
16.3.4 Class modifiers……Page 381
16.3.6 Interfaces……Page 382
16.3.7 Looking at your class……Page 383
16.4 Adding properties……Page 384
16.5 Adding getter/setter methods……Page 385
16.6 Creating methods for your class……Page 386
16.7 Summary……Page 388
Custom components……Page 389
17.1.1 A custom component example……Page 390
17.2.1 Simple and composite types……Page 391
17.3 Simple custom components……Page 392
17.4.1 Using a function to pass a value……Page 393
17.4.2 Passing a value as a property……Page 394
17.4.3 Using a setter function as a property proxy……Page 397
17.4.4 Using bound parameters……Page 398
17.5.1 Using a function to retrieve a value……Page 399
17.5.2 Using a property to retrieve a value……Page 400
17.5.3 Using a getter function as a property proxy……Page 403
17.6 Creating composite components……Page 405
17.7 Creating ActionScript components……Page 406
17.8 Custom events……Page 408
17.8.1 Passing along the event object……Page 410
17.9.3 Directory structure and namespaces……Page 411
17.10 Summary……Page 412
Advanced reusability in Flex……Page 414
18.2 Runtime shared libraries……Page 415
18.2.1 Standard RSLs……Page 416
18.2.2 Making your Flex application use RSL……Page 417
18.3.2 Creating a simple module……Page 419
18.3.3 Loading modules the MXML way with the Module API……Page 420
18.3.4 Loading and unloading modules with ActionScript……Page 421
18.3.5 Pros and cons of modules……Page 422
18.5 Refactoring……Page 423
18.6 Summary……Page 424
The finishing touches……Page 425
19.1 Styles……Page 427
19.1.1 Inline styles……Page 428
19.1.2 Local style definitions……Page 430
19.1.3 External stylesheets……Page 434
19.1.5 Working with color……Page 435
19.1.6 Transparency……Page 437
19.1.7 Using gradients……Page 438
19.1.8 Working with styles programmatically……Page 439
19.2.1 Embedding via the font’s system name……Page 441
19.2.3 Leveraging CSS……Page 442
19.3.2 To embed or not to embed……Page 443
19.3.3 Images as variables……Page 444
19.3.4 Icons……Page 445
19.4.2 19.4.2 Graphical skins with images……Page 447
19.4.3 Graphical skins with SWFs……Page 449
19.4.4 Flex skin design extensions (SDE)……Page 450
19.4.5 Image slicing……Page 451
19.4.6 Programmatic skins……Page 452
19.5 Summary……Page 453
20.1 What is an effect?……Page 454
20.2 Triggered effects……Page 455
20.3.1 Creating effects with ActionScript……Page 457
20.3.2 Using just ActionScript……Page 458
20.4.1 Sequential effects……Page 459
20.4.3 Composite composites……Page 460
20.5.1 The AnimateProperty effect……Page 461
20.5.3 The Dissolve effect……Page 462
20.5.4 The Fade effect……Page 463
20.5.5 The Glow effect……Page 464
20.5.7 The Move effect……Page 465
20.5.8 The Pause effect……Page 466
20.5.9 The Resize effect……Page 467
20.5.11 The SoundEffect effect……Page 468
20.5.12 The Wipe effects……Page 469
20.5.13 The Zoom effect……Page 470
20.6.1 Out-of-the-box easing functions……Page 471
20.6.2 Making your own easing functions……Page 472
20.8 Summary……Page 473
Drag-and-drop……Page 474
21.1 The drag-and-drop process……Page 475
21.3 Components that support drag-and-drop……Page 476
21.4 Enabling D&D on List-based components……Page 477
21.6 Multi-item drag……Page 479
21.7 Two-way drag-and-drop……Page 481
21.8 Using D&D for user-controlled sorting……Page 482
21.9.2 DragManager functions……Page 483
21.10.1 Limiting who gets into the party……Page 484
21.10.2 Preventing event propagation……Page 485
21.10.3 Use the DragEvent object to find the drop target……Page 486
21.11.1 Adding to the component’s dataProvider explicitly……Page 487
21.12 Adding D&D to non-List components……Page 488
21.12.2 Initiating the drag……Page 489
21.12.4 Handling the drop……Page 490
21.12.6 Putting it all together……Page 491
21.13.1 Changing the drag image……Page 493
21.13.2 Changing the drag proxy Icons……Page 494
21.14 Summary……Page 495
22.1 Introduction to charting……Page 496
22.1.2 Chart types overview……Page 497
22.2 Setting the stage with series and data……Page 498
22.3.1 Invoking a chart……Page 499
22.3.2 Adding a legend……Page 500
22.3.3 Changing chart types……Page 501
22.4 Stacking charts……Page 503
22.5.1 Area charts……Page 504
22.5.2 Bar charts and column charts……Page 505
22.5.3 Line charts……Page 506
22.5.4 Bubble charts……Page 507
22.5.5 Candlestick and HLOC charts……Page 509
22.5.6 Pie charts……Page 511
22.5.7 Plot charts……Page 513
22.6.2 Series fills……Page 515
22.7 Summary……Page 517
Debugging and testing……Page 518
23.1.2 Configuring logging……Page 519
23.1.3 Using the trace() function……Page 520
23.1.5 Converting objects to strings……Page 521
23.1.7 Monitoring network activity……Page 523
23.1.8 Using the Debugger……Page 524
23.2.1 Types of tests……Page 527
23.2.2 Flex Profiler……Page 528
23.2.3 FlexUnit (unit testing)……Page 531
23.2.4 Fluint (unit testing)……Page 534
23.2.6 RIATest (functional testing)……Page 537
23.2.7 HP QuickTest Pro (functional testing)……Page 538
23.3 Summary……Page 539
24.1 Printing……Page 540
24.1.3 Printing things……Page 541
24.1.4 Scaling things for print……Page 542
24.1.5 The art of adding objects……Page 543
24.1.6 Printing lists……Page 546
24.1.7 Catching when a user cancels……Page 548
24.2.1 Wrapper files……Page 549
24.2.3 The bare essentials……Page 550
24.2.5 Passing parameters in a wrapper……Page 551
24.3.1 Create a production build……Page 553
24.3.2 Positioning client-side files……Page 554
24.4 Summary……Page 555
Discussion forums……Page 557
North America……Page 558
International……Page 559
A……Page 561
B-C……Page 562
D……Page 565
E……Page 566
F……Page 567
G-H……Page 568
I-L……Page 569
M……Page 570
N-P……Page 571
Q-R……Page 572
S……Page 573
T-V……Page 575
W-X……Page 576
Y-Z……Page 577

Reviews

There are no reviews yet.

Be the first to review “Flex 3 in action”
Shopping Cart
Scroll to Top