Adobe Flex 3

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Книга Adobe Flex 3 Adobe Flex 3Книги English литература Автор: Adobe Systems Incorporated Год издания: 2007 Формат: pdf Издат.:Adobe Systems Incorporated Страниц: 1974 Размер: 8,1 Язык: Английский0 (голосов: 0) Оценка:Part of the Adobe Training from the Source series, the official curriculum from Adobe, developed by experienced trainers. Using project-based tutorials, this book/CD volume is designed to teach the techniques needed to create sophisticated, professional-level projects. Each book includes a CD that contains all the files used in the lessons, plus completed projects for comparison. In the course of the book, the reader will build several Web applications using Flex Builder incorporating MXML and ActionScript 3.0. This title covers the component framework for Rich Internet Applications, Adobe Flex 3.0. New Flex 3 features covered in this edition are: the advanced DataGrid, Data Connectivity Wizards, Modularizing the Flex application, and options for deploying your Flex project with AIR (Adobe Integrated Runtime).

Publisher: Adobe Systems Incorporated
Year: 2007

Language: English
Commentary: 19846
Pages: 1974

Contents......Page 3
Using this manual......Page 15
Viewing online documentation......Page 16
Typographical conventions......Page 17
Using Flex Programming Languages......Page 19
About MXML......Page 21
Writing a simple application......Page 22
Compiling MXML to SWF Files......Page 23
The relationship of MXML tags to ActionScript classes......Page 24
Developing applications......Page 25
Laying out a user interface using containers......Page 26
Adding user interface controls......Page 27
Using the id property with MXML tags......Page 28
Using XML namespaces......Page 29
Using MXML to trigger run-time code......Page 30
Binding data between components......Page 31
Using RPC services......Page 32
Storing data in a data model......Page 33
Validating data......Page 34
Formatting data......Page 35
Using Cascading Style Sheets (CSS)......Page 36
Using skins......Page 37
Defining custom MXML components......Page 38
Basic MXML syntax......Page 41
Setting component properties......Page 42
Setting properties using constants......Page 43
Setting the default property......Page 44
Escaping characters using the backslash character......Page 45
Including a newline character in a String value......Page 46
Setting Arrays of scalar values......Page 47
Setting Object properties......Page 48
Populating an Object with an Array......Page 49
Populating Arrays of objects......Page 50
Setting style and effect properties in MXML......Page 51
Specifying a URL value......Page 52
Using compiler tags......Page 53
MXML tag rules......Page 54
Using ActionScript in Flex applications......Page 55
About generated ActionScript......Page 56
Using ActionScript blocks in MXML files......Page 58
Referring to Flex components......Page 60
Calling component methods......Page 63
Creating visual Flex components in ActionScript......Page 64
About scope......Page 66
Including ActionScript files......Page 68
Using the source attribute to include ActionScript files......Page 69
Using the include directive......Page 70
Importing classes and packages......Page 71
Techniques for separating ActionScript from MXML......Page 72
One MXML document (Event handling logic in event attribute)......Page 73
One MXML document (Event handling logic in block)......Page 74
Creating ActionScript components......Page 75
Types of custom components......Page 76
Using for..in loops......Page 77
Using the introspection API......Page 79
About events......Page 83
About the bubbling phase......Page 85
About event subclasses......Page 86
Using events......Page 87
Specifying the Event object......Page 90
Accessing the target property......Page 91
Registering event handlers......Page 92
Defining event listeners inline......Page 93
Using the addEventListener() method......Page 95
Creating event handler classes......Page 101
Defining multiple listeners for a single event......Page 104
Registering a single listener with multiple components......Page 107
Passing additional parameters to listener functions......Page 109
Manually dispatching events......Page 112
Event propagation......Page 115
About the target and currentTarget properties......Page 116
Capturing phase......Page 117
Bubbling phase......Page 118
Stopping propagation......Page 119
Examples......Page 121
Event priorities......Page 122
Using event subclasses......Page 124
Handling keyboard events......Page 126
Understanding the keyCode and charCode properties......Page 128
Understanding KeyboardEvent precedence......Page 130
Handling keyboard-related MouseEvents......Page 132
About data access......Page 133
HTTPService components......Page 134
WebService components......Page 135
RemoteObject components......Page 136
Client-side processing and server-side processing......Page 137
Data source access......Page 138
Flash Professional data management......Page 139
Building User Interfaces for Flex Applications......Page 141
About visual components......Page 143
Class hierarchy for visual components......Page 144
Commonly used UIComponent properties......Page 145
Using components in MXML and ActionScript......Page 146
Initializing components at run time......Page 148
Sizing visual components......Page 151
Examples of component sizing......Page 153
Handling events......Page 156
About the component instantiation life cycle......Page 159
Using styles......Page 161
Using behaviors......Page 163
Changing the appearance of a component at run time......Page 165
Extending components......Page 168
About data providers and collections......Page 171
About data providers......Page 172
Data provider types......Page 173
Data providers and the uid property......Page 175
About collections......Page 177
Collection interfaces......Page 178
Collection classes......Page 179
Using a collection object directly......Page 180
Example: Using a simple data provider......Page 182
Using IList interface methods and properties......Page 184
Using ICollectionView interface methods and properties......Page 186
Sorting......Page 187
Example: Sorting and filtering an ArrayCollection......Page 188
Manipulating the view cursor......Page 190
Getting, adding and removing items......Page 191
Using bookmarks......Page 193
Example: Updating an Array Using ICollectionView interface methods and properties......Page 195
Using collection events......Page 199
Using the itemUpdated method......Page 201
Disabling and enabling automatic updating......Page 202
Example: Modifying data in DataGrid control......Page 204
Data descriptors and hierarchical data provider structure......Page 207
Data descriptor methods and source requirements......Page 208
Using the tag with Tree and menu-based controls......Page 210
Creating a custom data descriptor......Page 212
Using an XML data provider......Page 219
Using the XMLListCollection class......Page 221
Using a remote data source......Page 223
About sizing and positioning......Page 225
About layout in Flex......Page 226
About component sizing......Page 227
About component positioning......Page 228
Component layout patterns......Page 229
Basic layout rules and considerations......Page 230
Manually forcing layout......Page 231
Commonly used sizing properties......Page 232
Basic sizing characteristics and properties......Page 233
Maximum and minimum dimensions......Page 234
Basic sizing property rules......Page 235
Determining component size......Page 236
Determining container size......Page 237
Example: Determining an HBox container and child sizes......Page 238
Using default sizing......Page 240
Using percentage-based sizing......Page 241
Setting the Application container size......Page 246
Dealing with components that exceed their container size......Page 247
Using padding and custom gaps......Page 251
Using the Spacer control to control layout......Page 252
Disabling automatic positioning temporarily......Page 253
Preventing layout of hidden controls......Page 255
Using absolute positioning......Page 256
Creating a constraint-based layout......Page 259
Example: Using constraint-based layout for a form......Page 260
Constraint rows and columns......Page 263
Using ConstraintRow and ConstraintColumn objects......Page 264
Contents......Page 267
About controls......Page 268
Using data provider controls......Page 270
Flex controls......Page 271
Sizing controls......Page 274
Positioning controls......Page 275
Changing the appearance of controls......Page 276
Button control......Page 277
Embedding an icon in a Button control......Page 278
Button control user interaction......Page 279
Specifying image skins......Page 280
PopUpButton control......Page 281
Creating a PopUpButton control......Page 283
ButtonBar and ToggleButtonBar controls......Page 284
Creating a ButtonBar control......Page 286
Handling ButtonBar events......Page 287
LinkBar control......Page 288
Creating a LinkBar control......Page 289
Creating a TabBar control......Page 291
Passing data to a TabBar control......Page 293
Handling TabBar control events......Page 294
CheckBox control......Page 295
RadioButton control......Page 296
Creating a RadioButton control......Page 297
RadioButton user interaction......Page 299
Creating a group using the tag......Page 300
NumericStepper control......Page 302
Keyboard navigation......Page 303
About the DateChooser control......Page 304
About the DateField control......Page 305
Creating a DateChooser or DateField control......Page 306
Using the Date class......Page 307
Specifying header, weekday, and today’s day text styles......Page 308
Specifying selectable dates......Page 309
Setting DateChooser and DateField properties in ActionScript......Page 310
Formatting dates with the DateField control......Page 314
User interaction......Page 315
LinkButton control......Page 316
Creating a LinkButton control......Page 317
HSlider and VSlider controls......Page 319
About Slider controls......Page 320
Creating a Slider control......Page 321
Using slider events......Page 324
Using data tips......Page 326
Keyboard navigation......Page 327
SWFLoader control......Page 328
Creating a SWFLoader control......Page 329
Interacting with a loaded Flex application......Page 330
Using the SWFLoader control to load a LiveCycle Data Services ES application......Page 332
Sizing a SWFLoader control......Page 333
About importing images......Page 334
Specifying the image path......Page 335
Sizing an image......Page 337
Maintaining aspect ratio when sizing......Page 338
Positioning the image in a Canvas container......Page 340
Setting visibility......Page 341
Techniques for using the Image control......Page 342
VideoDisplay control......Page 344
Setting the size of a media component......Page 345
Using methods of the VideoDisplay control......Page 346
Adding a cue point......Page 347
Adding a cue point by using the CuePointManager class......Page 348
Streaming video from a camera......Page 349
Using the VideoDisplay control with Flash Media Server 2......Page 350
About the ColorPicker control......Page 351
Creating a ColorPicker control......Page 353
Example: ColorPicker control that uses Objects......Page 355
Using custom field names......Page 357
Keyboard interaction......Page 358
Alert control......Page 360
Using event listeners with the Alert control......Page 363
ProgressBar control......Page 365
ProgressBar control modes......Page 366
Creating a ProgressBar control......Page 367
Defining the label of a ProgressBar control......Page 368
HRule and VRule controls......Page 370
Creating HRule and VRule controls......Page 371
Sizing HRule and VRule controls......Page 372
Setting style properties......Page 373
ScrollBar control......Page 374
Creating a ScrollBar control......Page 375
User interaction......Page 376
About text controls......Page 377
Using the text property......Page 379
Specifying special characters in the text property......Page 380
Specifying special characters in ActionScript......Page 382
Specifying HTML tags and text......Page 384
Specifying HTML text......Page 385
Escaping special characters in HTML text......Page 386
Anchor tag ()......Page 388
Bold tag ()......Page 389
Font tag ()......Page 390
Image tag ()......Page 391
List item tag (
  • )......Page 393
    Underline tag ()......Page 394
    Getting a selection......Page 395
    Getting a TextRange object......Page 396
    Changing text......Page 397
    Example: changing selected text in a RichTextEditor control......Page 399
    Label control......Page 400
    TextInput control......Page 401
    Sizing a TextInput control......Page 402
    Text control......Page 403
    Sizing a Text control......Page 404
    TextArea control......Page 405
    About the RichTextEditor control......Page 406
    Creating a RichTextEditor control......Page 408
    Sizing the RichTextEditor control......Page 409
    Programming RichTextEditor subcontrols......Page 410
    Removing and adding RichTextEditor subcontrols.......Page 411
    About menu-based controls......Page 415
    About menu data providers......Page 416
    Menu entry types......Page 417
    Menu attributes......Page 418
    Example: An Array menu data provider......Page 420
    Example: An XML menu data provider with icons......Page 421
    Handling Menu control events......Page 423
    Handling MenuBar events......Page 426
    Example: Using Menu control events......Page 430
    Handling PopUpMenuButton control events......Page 433
    About the Menu Control......Page 435
    Creating a Menu control......Page 436
    Example: Creating a simple Menu control......Page 437
    Menu control user interaction......Page 438
    Creating a MenuBar control......Page 439
    PopUpMenuButton control......Page 441
    About the PopUpMenuButton control......Page 442
    Creating a PopUpMenuButton control......Page 443
    Example: Creating a PopUpMenuButton control......Page 444
    Using the label property......Page 445
    PopUpMenuButton user interaction......Page 446
    Contents......Page 447
    List control sizing......Page 448
    Creating a List control......Page 449
    Using a label function......Page 450
    Displaying ScrollTips......Page 452
    Setting variable row height and wrapping List text......Page 453
    Using a custom item renderer......Page 454
    Specifying an icon to the List control......Page 455
    Alternating row colors in a List control......Page 456
    List control user interaction......Page 457
    About HorizontaList controls......Page 458
    Creating a HorizontalList control......Page 459
    Keyboard navigation......Page 461
    About the TileList control......Page 462
    Creating a TileList control......Page 463
    TileList control user interaction......Page 465
    ComboBox control......Page 466
    Creating a ComboBox control......Page 467
    Using events with ComboBox controls......Page 469
    Specifying ComboBox labels......Page 471
    Populating a ComboBox control using variables and models......Page 472
    ComboBox control user interaction......Page 473
    About the DataGrid control......Page 475
    Creating a DataGrid control......Page 476
    Specifying columns......Page 478
    Hiding and displaying columns......Page 479
    Passing data to a DataGrid control......Page 480
    Handling events in a DataGrid control......Page 481
    Determining the initial DataGrid sort order......Page 482
    Controlling user sorting of DataGrid displays......Page 483
    Example: Sorting a DataGrid on multiple columns......Page 484
    DataGrid control user interaction......Page 486
    Tree control......Page 487
    Creating a Tree control......Page 488
    Handling Tree control events......Page 491
    Expanding a tree node......Page 492
    Specifying Tree control icons......Page 495
    Using icon fields......Page 496
    Using the setItemIcon() method......Page 497
    Editing a node label at run time......Page 498
    Using the keyboard to edit labels......Page 499
    Tree Navigation keys......Page 500
    Contents......Page 501
    About the AdvancedDataGrid control......Page 502
    Sorting by multiple columns......Page 504
    Styling rows and columns......Page 506
    Styling rows......Page 508
    Styling columns......Page 510
    Using a data formatter in a column......Page 511
    Selecting multiple cells and rows......Page 513
    Hierarchical and grouped data display......Page 517
    Setting the data provider with hierarchical data......Page 520
    Controlling the navigation tree......Page 521
    Setting navigation tree icons and labels......Page 522
    Creating a separate column for the navigation tree......Page 524
    Displaying hierarchical data......Page 525
    Defining hierarchical data with an ArrayCollection......Page 526
    Displaying hierarchical XML data......Page 528
    Displaying grouped data......Page 529
    Calling the GroupingCollection.refresh() method......Page 532
    Creating a column for the GroupLabel field......Page 533
    Creating groups in ActionScript......Page 535
    Creating summary rows......Page 536
    Using the default properties of the GroupingField and SummaryRow classes......Page 540
    Specifying the location of the summary data......Page 541
    Creating multiple summaries......Page 543
    Creating column groups......Page 544
    Dragging and dropping columns in the group......Page 547
    Using grouped columns with hierarchical data......Page 548
    Using item renderers with the AdvancedDataGrid control......Page 550
    Using an item renderer......Page 551
    Using a renderer to generate column data......Page 554
    Using an item renderer that spans an entire row......Page 557
    Keyboard navigation......Page 560
    About containers......Page 563
    About layout containers and navigator containers......Page 564
    Using containers......Page 565
    Flex containers......Page 569
    Class hierarchy for containers......Page 570
    Container example......Page 571
    Event overview......Page 572
    About the creation policy......Page 573
    About the initialize and creationComplete events......Page 574
    Disabling containers......Page 576
    Using the Panel container......Page 577
    Defining a default button......Page 578
    Using scroll bars......Page 579
    Scroll bar layout considerations......Page 580
    Controlling scroll delay and interval......Page 581
    About the coordinate systems......Page 582
    Using coordinate properties and methods......Page 584
    Example: Using the mouse position in a Canvas container......Page 585
    About the display list and container children......Page 588
    Obtaining the number of child components in a container or application......Page 590
    Creating and removing components at run time......Page 591
    Example: Creating and removing a child of an VBox container......Page 594
    Example: Creating and removing children of an Accordion container......Page 596
    Controlling child order......Page 597
    Using the Application container......Page 601
    Sizing an Application container and its children......Page 602
    Changing the Application background......Page 605
    Using the plain style......Page 606
    Viewing the application source code......Page 607
    Specifying options of the Application container......Page 608
    About the Document object......Page 609
    Accessing Document and Application object scopes......Page 610
    Using the mx.core.Application.application property......Page 611
    Using the parentDocument property......Page 613
    Showing the download progress of an application......Page 614
    Creating a custom progress bar......Page 615
    Download progress bar events......Page 616
    Creating a simple subclass of the DownloadProgressBar class......Page 617
    Creating a subclass of the DownloadProgressBar class......Page 619
    Creating a subclass of Sprite......Page 621
    Contents......Page 625
    Canvas layout container......Page 626
    Creating a Canvas Control by using absolute positioning......Page 627
    Preventing overlapping children......Page 629
    Box, HBox, and VBox layout containers......Page 631
    Creating a Box, HBox, or VBox container......Page 632
    ControlBar layout container......Page 634
    Creating a ControlBar container......Page 635
    ApplicationControlBar layout container......Page 636
    Creating an ApplicationControlBar container......Page 637
    DividedBox, HDividedBox, and VDividedBox layout containers......Page 639
    Creating a DividedBox, HDividedBox, or VDividedBox container......Page 640
    Form, FormHeading, and FormItem layout containers......Page 642
    About forms......Page 643
    Creating the Form container......Page 644
    Creating a FormItem container......Page 645
    Controlling form item label style......Page 646
    Example: A simple form......Page 647
    Aligning and spacing Form container children......Page 648
    Defining a default button......Page 650
    Specifying required fields......Page 652
    Storing and validating form data......Page 653
    Using Form controls to hold your form data......Page 655
    Validating form control contents data on user entry......Page 657
    Using a Flex data model to store form data......Page 658
    Using Flex validators with form models......Page 660
    Submitting data to a server......Page 662
    Grid layout container......Page 666
    Creating a Grid layout container......Page 667
    Setting the row and column span......Page 671
    Panel layout container......Page 673
    Adding a ControlBar container to a Panel container......Page 675
    Tile layout container......Page 678
    Creating a Tile layout container......Page 679
    Sizing and positioning a child in a Tile container......Page 680
    TitleWindow layout container......Page 681
    Creating a pop-up window......Page 683
    Removing a pop-up window......Page 687
    Using TitleWindow and PopUpManager events......Page 688
    Centering a pop-up window......Page 690
    Passing data to and from a pop-up window......Page 691
    Passing data using events......Page 694
    Using the addPopUp() method......Page 696
    About navigator containers......Page 699
    ViewStack navigator container......Page 700
    Creating a ViewStack container......Page 701
    Applying behaviors to a ViewStack container......Page 704
    TabNavigator container......Page 706
    Creating a TabNavigator container......Page 707
    TabNavigator container Keyboard navigation......Page 709
    Accordion navigator container......Page 710
    Creating an Accordion container......Page 712
    Using Button controls to navigate an Accordion container......Page 713
    Controlling the appearance of accordion buttons......Page 715
    Customizing the User Interface......Page 717
    About behaviors......Page 719
    About applying behaviors......Page 720
    About factory and instance classes......Page 722
    Available effects......Page 724
    Available triggers......Page 728
    Applying behaviors in MXML......Page 729
    Applying behaviors in MXML using data binding......Page 730
    Applying behaviors in MXML using styles......Page 731
    Using setStyle() and getStyle() with behaviors defined in MXML......Page 732
    Applying behaviors in ActionScript......Page 733
    Playing an effect backward......Page 735
    Ending an effect......Page 736
    Creating a reusable effect......Page 738
    Applying behaviors in ActionScript using styles......Page 739
    Applying behaviors using the Effect.target and Effect.targets properties......Page 742
    Using embedded fonts with effects......Page 744
    Creating composite effects......Page 745
    Delaying effect start......Page 748
    Repeating effects......Page 749
    Using a sound effect......Page 750
    Using a mask effect......Page 752
    Creating a custom mask function......Page 753
    Handling effect events......Page 755
    Handling tween effect events......Page 757
    Using an easing function......Page 758
    Using a Flex easing function......Page 759
    Creating a custom easing function......Page 761
    Disabling container layout for effects......Page 762
    Improving performance when resizing Panel containers......Page 764
    Setting UIComponent.cachePolicy on the effect target......Page 765
    About styles......Page 767
    External style sheets......Page 768
    Local style definitions......Page 769
    getStyle() and setStyle() methods......Page 770
    Inline styles......Page 771
    Length format......Page 772
    Time format......Page 775
    Color format......Page 776
    Using Arrays for style properties......Page 777
    Using Cascading Style Sheets......Page 781
    About property and selector names......Page 782
    About inheritance in CSS......Page 783
    About class selectors......Page 784
    About type selectors......Page 785
    Using compound selectors......Page 787
    About selector precedence......Page 788
    Supported CSS properties......Page 789
    Embedding resources in style sheets......Page 790
    Style inheritance order......Page 791
    Inheritance exceptions......Page 793
    About supported styles......Page 794
    About the themeColor property......Page 795
    Using external style sheets......Page 796
    Using local style definitions......Page 797
    Using the Application type selector......Page 798
    Using the global selector......Page 799
    Using the StyleManager class......Page 800
    Setting styles......Page 807
    Using inline styles......Page 812
    Loading style sheets at run time......Page 814
    Creating a run-time style sheet......Page 815
    Compiling the CSS-based SWF file......Page 816
    Loading style sheets at run time......Page 817
    Unloading style sheets at run time......Page 820
    Using run-time style sheets in custom components......Page 821
    Using theme SWC files as run-time style sheets......Page 822
    Using filters in Flex......Page 823
    Using themes......Page 828
    Creating a theme SWC file......Page 830
    Creating a theme style sheet......Page 831
    Compiling a theme SWC file......Page 832
    Using a configuration file to compile theme SWC files......Page 833
    About fonts......Page 835
    Using device fonts......Page 837
    Using embedded fonts......Page 838
    Embedded font syntax......Page 839
    Locating embedded fonts......Page 842
    Embedding fonts in ActionScript......Page 843
    Using advanced anti-aliasing......Page 847
    Detecting embedded fonts......Page 850
    Using multiple typefaces......Page 853
    Setting character ranges......Page 858
    Setting ranges in font-face declarations......Page 859
    Setting ranges in flex-config.xml......Page 860
    Detecting available ranges......Page 861
    Embedding fonts from SWF files......Page 862
    Creating Flash 8 files with embedded fonts......Page 863
    Embedding fonts from SWF files into Flex applications......Page 865
    Troubleshooting......Page 874
    Resolving run-time errors......Page 875
    About skinning......Page 879
    Types of skins......Page 880
    Creating skins......Page 881
    Creating graphical skins......Page 882
    Creating programmatic skins......Page 883
    Creating stateful skins......Page 887
    Sizing skins......Page 888
    Skinning subcomponents......Page 889
    Skin resources......Page 890
    Applying programmatic skins inline......Page 891
    Applying skins by using CSS......Page 893
    Using CSS to apply graphical skins......Page 894
    Applying skins by using the setStyle() method......Page 895
    Using the setStyle() method to apply graphical skins......Page 896
    Using the setStyle() method to apply programmatic skins......Page 897
    Creating graphical skins......Page 899
    Using JPEG, GIF, and PNG files as skins......Page 900
    Using static SWF assets as skins......Page 901
    Creating programmatic skins......Page 903
    Programmatic skins recipe......Page 904
    Selecting an interface or base class for your skin......Page 905
    Compiling programmatic skins......Page 907
    Implementing the updateDisplayList() method......Page 908
    Drawing programmatically......Page 911
    Implementing measuredWidth and measuredHeight getters......Page 917
    Implementing a getter for the borderMetrics property......Page 919
    Creating stateful skins......Page 921
    Example: creating a stateful skin......Page 923
    Creating stateful skin using images......Page 926
    Using transitions with a stateful skin......Page 928
    Accessing the parent component......Page 930
    Making properties styleable......Page 934
    About item renderers......Page 939
    Default item rendering and cell editing......Page 940
    Using custom item renderers and item editors......Page 943
    Item renderer and item editor architecture......Page 944
    About item renderer and item editor interfaces......Page 946
    Application layout with item renderers and item editors......Page 947
    Using a drop-in item renderer or item editor......Page 948
    Using an inline item renderer or item editor......Page 950
    Using a component as an item renderer or item editor......Page 951
    Using editable controls in an item renderer......Page 952
    Setting the itemRenderer or itemEditor property in ActionScript......Page 953
    About the item renderer and item editor life cycle......Page 955
    Accessing the listData property......Page 956
    Using drop-in item renderers and item editors......Page 959
    Requirements of a drop-in item renderers in a List control......Page 963
    Creating a simple inline item renderer or item editor......Page 964
    Creating a complex inline item renderer or item editor......Page 965
    Items allowed in an inline component......Page 967
    Defining the scope in an tag......Page 968
    Creating a reusable inline item renderer or item editor......Page 970
    Creating an item renderer component......Page 972
    Overriding the data property......Page 976
    About using the creationComplete and dataChange events......Page 978
    Creating an item renderer in ActionScript......Page 979
    Working with item renderers......Page 980
    Example: Using an item renderer with the TileList and HorizontalList controls......Page 981
    Example: Using an item renderer with a DataGrid control......Page 983
    Example: Using an item renderer with a List control......Page 986
    Example: Using an item renderer with a Tree control......Page 987
    The cell editing process......Page 993
    Creating an editable cell......Page 994
    Returning data from an item editor......Page 995
    Defining a property to return data......Page 996
    Sizing and positioning an item editor......Page 999
    Making an item editor that responds to the Enter key......Page 1001
    Using the cell editing events......Page 1002
    Accessing cell data and the item editor in an event listener......Page 1005
    Determining the reason for an itemEditEnd event......Page 1007
    Item editor examples......Page 1010
    Example: Preventing a cell from being edited......Page 1011
    Example: Modifying data passed to or received from an item editor......Page 1013
    Example: Passing multiple values back from an item editor......Page 1015
    Example: Using an item renderer as an item editor......Page 1021
    Example: Using a data validator in a custom item editor......Page 1023
    Examples using item editors with the list controls......Page 1024
    Example: Using a custom item editor with a List control......Page 1025
    Example: Using a custom item editor with a Tree control......Page 1028
    About ToolTips......Page 1033
    Creating ToolTips......Page 1034
    Setting styles in ToolTips......Page 1036
    Setting the width of ToolTips......Page 1039
    Using ToolTips with NavBar controls......Page 1040
    Enabling and disabling ToolTips......Page 1042
    Setting delay times......Page 1043
    Using effects with ToolTips......Page 1044
    Using dynamic ToolTip text......Page 1045
    Creating custom ToolTips......Page 1047
    Positioning custom ToolTips......Page 1051
    Using error tips......Page 1055
    Reskinning ToolTips......Page 1059
    About the Cursor Manager......Page 1063
    Using the Cursor Manager......Page 1064
    Creating and removing a cursor......Page 1065
    Setting a busy cursor......Page 1066
    Using the showBusyCursor property......Page 1069
    About resource bundles and properties files......Page 1071
    Creating a localized application......Page 1072
    Using the ResourceBundle metadata tag......Page 1074
    Using the @Resource directive......Page 1075
    Substituting localized String values......Page 1076
    Using localized ActionScript classes......Page 1077
    Using embedded assets......Page 1079
    Using localized properties files and ResourceBundle subclasses......Page 1082
    Localized properties file and class search order......Page 1083
    Creating the application SWF file......Page 1084
    Creating a localized SWC file......Page 1086
    Flex Programming Topics......Page 1089
    About Repeater components......Page 1091
    Declaring the Repeater component in MXML......Page 1092
    Basic principles of the Repeater component......Page 1094
    Creating dynamic loops with the Repeater component......Page 1097
    Referencing repeated components......Page 1100
    Referencing repeated child components......Page 1101
    Referencing nested Repeater components......Page 1102
    Event handlers in Repeater components......Page 1103
    Accessing specific instances of repeated components......Page 1106
    Using a Repeater component in a custom MXML component......Page 1110
    Recreating children in a Repeater component......Page 1112
    Considerations when using a Repeater component......Page 1113
    About view states......Page 1115
    Defining a login interface by using view states......Page 1116
    Example: Login form application......Page 1118
    Example: Controlling layout using view states......Page 1120
    Additional state-based application techniques......Page 1122
    Creating view states......Page 1123
    View state overrides......Page 1124
    Applying view states......Page 1125
    Example: Creating a simple view state......Page 1126
    Basing a view state on another view state......Page 1127
    Creating a view state in ActionScript......Page 1129
    Defining view state overrides......Page 1133
    Setting overrides on component properties......Page 1134
    Setting overrides on component styles......Page 1136
    Adding a child component......Page 1137
    Controlling when to create added children......Page 1139
    Using the handlerFunction property......Page 1146
    Using the handler event type......Page 1147
    Example: Setting event handlers......Page 1148
    Defining view states in custom components......Page 1149
    Using view states with a custom item renderer......Page 1152
    Example: Using view states with a custom item renderer......Page 1154
    Using view states with history management......Page 1156
    Creating your own override classes......Page 1158
    About transitions......Page 1163
    Example: Using transitions with a login form......Page 1165
    Comparing transitions to effects......Page 1166
    Defining transitions......Page 1167
    Defining multiple transitions......Page 1170
    Defining effect targets......Page 1171
    Defining the effect start and end values......Page 1172
    Handling events when using transitions......Page 1174
    Using action effects in a transition......Page 1175
    Example: Using action effects......Page 1178
    Filtering effects......Page 1179
    Example: Using a filter......Page 1181
    Defining a custom filter......Page 1182
    Writing a filter function......Page 1186
    Example: Using a custom effect filter......Page 1189
    Tips......Page 1192
    Troubleshooting......Page 1193
    About the drag-and-drop operation......Page 1195
    Using drag-and-drop with list-based controls......Page 1197
    Performing a two-way drag and drop......Page 1200
    Dragging and dropping in the same control......Page 1202
    Drag and drop properties for list-based controls......Page 1203
    Classes used in drag-and-drop operations......Page 1204
    Drag-and-drop events for a drag initiator......Page 1205
    Drag-and-drop events for a drop target......Page 1206
    The drag-and-drop operation......Page 1207
    Example: Simple drag-and-drop operation for a nonlist-based control......Page 1209
    Writing the mouseDown event handler......Page 1211
    Handling the dragDrop event......Page 1213
    Example: handling drag and drop events in a list- based control......Page 1214
    Drag and drop examples......Page 1217
    Example: Using a container as a drop target......Page 1218
    Example: Specifying the drag proxy......Page 1220
    Example: Handling the dragOver and dragExit events for the drop target......Page 1222
    About copying data......Page 1227
    Example: Copying data from one List control to another List control......Page 1228
    Example: Copying data from a List control to a DataGrid control......Page 1230
    Example: Moving and a copying data for a nonlist- based control......Page 1232
    About embedding assets......Page 1237
    Examples of embedding assets......Page 1238
    Accessing assets at run time......Page 1239
    Syntax for embedding assets......Page 1240
    Embed parameters......Page 1241
    About setting the path to the embedded asset......Page 1242
    About the MIME type......Page 1243
    Using the @Embed() directive in MXML......Page 1244
    Embedding JPEG, GIF, and PNG images......Page 1245
    Embedding SVG images......Page 1247
    Embedding sounds......Page 1248
    Embedding SWF symbols......Page 1249
    Embedding SWF files that represent Flex applications......Page 1250
    Using 9-slice scaling with embedded images......Page 1251
    System requirements......Page 1255
    Importing static SWF 9 assets......Page 1256
    Importing dynamic SWF 9 assets......Page 1258
    Creating the symbol for your component......Page 1259
    Actions performed by the Make Flex Component command......Page 1261
    Compiling your Flex application......Page 1262
    Using SWF 9 files as skins......Page 1264
    Adding custom events......Page 1265
    Adding tool tips to Flash components......Page 1266
    Controlling the size of a Flash component......Page 1267
    Adding a bounding box to a Flash component......Page 1268
    Overriding the setActualSize() method......Page 1269
    Adding view states and transitions to SWF 9 assets......Page 1271
    Adding transitions......Page 1272
    Using tweens in a transition......Page 1275
    About modules......Page 1277
    Benefits of modules......Page 1278
    Module API details......Page 1279
    Creating modules......Page 1280
    Creating MXML-based modules......Page 1281
    Creating modules in Flex Builder......Page 1282
    Creating ActionScript-based modules......Page 1283
    Compiling modules......Page 1284
    Using modules in a single project......Page 1285
    Using multiple projects......Page 1286
    Reducing module size......Page 1290
    Loading and unloading modules......Page 1292
    Using the ModuleLoader class to load modules......Page 1293
    Using the ModuleManager class to load modules......Page 1296
    Loading modules from different servers......Page 1297
    Preloading modules......Page 1299
    Using ModuleLoader events......Page 1301
    Using the error event......Page 1305
    Using the progress event......Page 1307
    Passing data......Page 1310
    Accessing modules from the parent application......Page 1311
    Accessing the parent application from the modules......Page 1314
    Accessing modules from other modules......Page 1316
    Passing data with the query string......Page 1318
    Using interfaces for module communication......Page 1321
    Contents......Page 1327
    Using standard history management......Page 1328
    Registering components with the HistoryManager......Page 1330
    Implementing the loadState() and saveState() methods......Page 1331
    Using history management with a list-based control control......Page 1333
    Calling the HistoryManager class’s static methods......Page 1335
    Encoding navigation state data......Page 1336
    Using history management without LiveCycle Data Services ES......Page 1337
    Using history management with LiveCycle Data Services ES......Page 1339
    Contents......Page 1341
    Using the FlexPrintJob class......Page 1342
    Starting a print job......Page 1343
    Scaling a print job......Page 1344
    Completing the print operation......Page 1345
    Example: A simple print job......Page 1346
    Using a print-specific output format......Page 1347
    Example: A simple print-specific output format......Page 1348
    Printing known-length multipage output......Page 1351
    Using the sizeToPage attribute to format pages......Page 1352
    Using the nextPage() method and validNextPage property to print multiple pages......Page 1353
    Example: Printing with multipage PrintDataGrid controls......Page 1354
    Multipage print application file......Page 1355
    Print output component......Page 1358
    Header and footer files......Page 1359
    Using the PrintAdvancedDataGrid control......Page 1360
    About exchanging data with Flex applications......Page 1363
    Accessing environment information......Page 1365
    About the ExternalInterface API......Page 1366
    Passing request data with flashVars properties......Page 1368
    Using the src properties to pass request data......Page 1371
    Accessing the flashVars properties......Page 1372
    Accessing JavaScript functions from Flex......Page 1373
    Calling JavaScript methods from Flex applications......Page 1374
    The navigateToURL() method syntax......Page 1381
    Calling JavaScript functions with the URLRequest object......Page 1384
    Invoking JavaScript with the navigateToURL() method......Page 1385
    Accessing Flex from JavaScript......Page 1387
    Handling multiple browser types......Page 1390
    Editing the Flex application’s id and name properties......Page 1392
    About ExternalInterface API security in Flex......Page 1393
    About the addCallback() method......Page 1394
    Shared objects compared with cookies......Page 1395
    About the SharedObject class......Page 1396
    Creating a shared object......Page 1397
    Adding data to a shared object......Page 1398
    Storing objects in shared objects......Page 1399
    Creating multiple shared objects......Page 1403
    SharedObject example......Page 1404
    Accessibility overview......Page 1407
    About screen reader technology......Page 1409
    Flash Player and Microsoft Active Accessibility......Page 1410
    Enabling accessibility in Flex......Page 1411
    Accessible components and containers......Page 1412
    Scrolling to a component when tabbing......Page 1416
    Implementing screen reader detection with the Accessibility.isActive() method......Page 1420
    Testing accessible content......Page 1421
    Data Access and Interconnectivity......Page 1423
    Using HTTPService components......Page 1425
    MXML code......Page 1426
    MySQL database script......Page 1427
    PHP code......Page 1428
    MXML code......Page 1429
    ColdFusion code......Page 1431
    MXML code......Page 1432
    JSP code......Page 1433
    Calling HTTP services in ActionScript......Page 1435
    Looking at an application......Page 1436
    MXML code......Page 1437
    WSDL document......Page 1438
    Reading WSDL documents......Page 1441
    RPC-oriented operations and document-oriented operations......Page 1442
    Adding SOAP headers to web service requests......Page 1443
    Clearing SOAP headers......Page 1446
    Using RemoteObject components......Page 1447
    MXML code......Page 1448
    ColdFusion Component......Page 1450
    Calling RemoteObject components in ActionScript......Page 1451
    Accessing EJBs and other objects in JNDI......Page 1452
    Reserved method names......Page 1453
    Explicit parameter passing and parameter binding......Page 1454
    Explicit parameter passing with RemoteObject and WebService components......Page 1455
    Explicit parameter passing with HTTPService components......Page 1456
    Parameter binding with RemoteObject components......Page 1457
    Parameter binding with HTTPService components......Page 1461
    Parameter binding with WebService components......Page 1462
    Handling result and fault events......Page 1465
    Handling results as XML with the e4x result format......Page 1468
    About data representation......Page 1473
    Data models......Page 1476
    Data validation......Page 1477
    Data formatting......Page 1478
    About data binding......Page 1481
    When data binding occurs......Page 1483
    Using read-only properties as the source for data binding......Page 1484
    Creating properties to use as the source for data binding......Page 1485
    Data binding examples......Page 1486
    Using data binding with data models......Page 1487
    Binding more than one source property to a destination property......Page 1488
    Binding to functions, Objects and arrays......Page 1489
    Binding to functions in response to a data-binding event......Page 1490
    Binding to Objects......Page 1492
    Binding to properties of Objects......Page 1494
    Binding with arrays......Page 1496
    Binding to arrays......Page 1497
    Binding to array elements......Page 1498
    Using ActionScript expressions in curly braces......Page 1499
    Using ActionScript expressions in Binding tags......Page 1501
    Using an E4X expression in a data binding expression......Page 1502
    Using an E4X expression in curly braces......Page 1503
    Using an E4X expression in an tag......Page 1504
    Example: Defining a data binding in ActionScript......Page 1506
    Defining binding watchers......Page 1508
    Using the Bindable metadata tag......Page 1509
    Using static properties as the source for data binding......Page 1512
    Working with bindable property chains......Page 1513
    Considerations for using the binding feature......Page 1514
    Debugging data binding......Page 1515
    About data models......Page 1517
    The tag......Page 1518
    The tag......Page 1519
    Class-based models......Page 1520
    Specifying an external source for an tag or tag......Page 1522
    Using validators with a data model......Page 1524
    Using a data model as a value object......Page 1525
    Binding data into an XML data model......Page 1527
    Validating data......Page 1529
    About validators......Page 1530
    About the source and property properties......Page 1531
    About triggering validation......Page 1532
    About validation events......Page 1533
    Triggering validation by using events......Page 1534
    Triggering validation for data bindings......Page 1535
    Triggering validation programmatically......Page 1539
    Handling the return value of the validate() method......Page 1540
    Triggering the DateValidator and CreditCardValidator......Page 1542
    Invoking multiple validators in a function......Page 1544
    Creating a reusable validator......Page 1547
    Conditionalizing validator execution......Page 1548
    Validating required fields......Page 1550
    Using data binding to configure validators......Page 1551
    General guidelines for validation......Page 1552
    Configuring error messages......Page 1555
    Changing the color of the validation error message......Page 1556
    Clearing a validation error......Page 1557
    Specifying a listener for validation......Page 1558
    Working with validation events......Page 1559
    Explicitly handling component validation events......Page 1560
    Explicitly handing validator validation events......Page 1561
    Using the CreditCardValidator class......Page 1562
    Using the CurrencyValidator class......Page 1565
    Using the DateValidator class......Page 1566
    Using the EmailValidator class......Page 1568
    Using the NumberValidator class......Page 1569
    Using the RegExpValidator class......Page 1570
    Using the StringValidator class......Page 1573
    Using the ZipCodeValidator class......Page 1574
    Using formatters......Page 1575
    Writing an error handler function......Page 1577
    Using the CurrencyFormatter class......Page 1579
    Error handling: CurrencyFormatter class......Page 1580
    Using Pattern strings......Page 1581
    Using the NumberFormatter class......Page 1584
    Example: Using the NumberFormatter class......Page 1585
    Using the PhoneFormatter class......Page 1586
    Example: Using the PhoneFormatter class......Page 1587
    Using the ZipCodeFormatter class......Page 1588
    Example: Using the ZipCodeFormatter class......Page 1589
    Error handling: ZipCodeFormatter class......Page 1590
    Charting Components......Page 1591
    About charting......Page 1593
    Using the charting controls......Page 1595
    About the series classes......Page 1603
    About the axis classes......Page 1604
    About charting events......Page 1605
    Creating charts in ActionScript......Page 1606
    Using chart data......Page 1613
    Types of chart data......Page 1614
    Using static Arrays as data providers......Page 1615
    Using collections as data providers......Page 1619
    Using an XML file as a data provider......Page 1628
    Randomly generating chart data......Page 1633
    Changing chart data at run time......Page 1634
    Contents......Page 1645
    Using area charts......Page 1646
    Using bar charts......Page 1649
    Using bubble charts......Page 1651
    Using multiple series in BubbleChart controls......Page 1653
    Using candlestick charts......Page 1657
    Using column charts......Page 1662
    Using HighLowOpenClose charts......Page 1669
    Using line charts......Page 1673
    Formatting lines......Page 1677
    Using vertical lines in a LineChart control......Page 1681
    Using pie charts......Page 1684
    Using data labels with PieChart controls......Page 1685
    Creating doughnut charts......Page 1687
    Creating exploding pie charts......Page 1689
    Using plot charts......Page 1692
    Using multiple data series......Page 1696
    Using multiple axes......Page 1698
    Using the second axis......Page 1701
    Using multiple axis renderers......Page 1702
    Contents......Page 1707
    Applying CSS to chart controls......Page 1708
    Applying different styles to each series......Page 1709
    Using predefined axis style properties......Page 1712
    Using class selectors for axis styles......Page 1713
    Applying styles inline......Page 1714
    Applying styles by binding tag definitions......Page 1715
    Using ChartElement objects......Page 1717
    Setting padding properties......Page 1720
    Formatting tick marks......Page 1725
    Formatting axis lines......Page 1727
    Using strokes......Page 1730
    Defining AxisRenderer properties with strokes......Page 1733
    Using strokes in ActionScript......Page 1735
    Defining strokes for LineSeries and AreaSeries......Page 1736
    Using fills......Page 1738
    Setting fills with CSS......Page 1746
    Using gradient fills with chart controls......Page 1751
    Using different alpha values with fills......Page 1754
    Using filters......Page 1758
    Using grid lines......Page 1767
    Formatting grid lines with MXML......Page 1770
    Formatting grid lines with CSS......Page 1773
    Formatting grid lines with ActionScript......Page 1775
    Rotating axis labels......Page 1776
    Skinning ChartItem objects......Page 1779
    Using multiple renderer classes......Page 1780
    Creating graphical renderers......Page 1781
    Creating programmatic renderers......Page 1784
    Formatting Legend controls......Page 1787
    Setting the direction of legends......Page 1790
    Formatting the legend markers......Page 1791
    Working with axes......Page 1795
    About the CategoryAxis class......Page 1796
    About the NumericAxis class......Page 1799
    About the LinearAxis subclass......Page 1800
    About the LogAxis subclass......Page 1801
    About supported types......Page 1803
    Using the parseFunction property......Page 1805
    Setting minimum and maximum values on a DateTimeAxis......Page 1808
    Omitting days on a DateTimeAxis......Page 1810
    Adding axis titles......Page 1818
    Defining axis labels......Page 1822
    Disabling axis labels......Page 1823
    Customizing axis labels......Page 1824
    Setting ranges......Page 1828
    Using data labels......Page 1829
    Adding data labels......Page 1832
    Styling data labels......Page 1833
    Aligning data labels......Page 1835
    Rotating data labels......Page 1836
    Customizing data label values......Page 1838
    Customizing data labels for ColumnSeries and BarSeries objects......Page 1839
    Customizing data labels for PieSeries objects......Page 1841
    Using DataTips......Page 1844
    Showing multiple DataTips......Page 1850
    Customizing DataTip values......Page 1851
    Using per-item fills......Page 1856
    Using the minField property......Page 1865
    Stacking charts......Page 1867
    Using Legend controls......Page 1873
    Adding a Legend control to your chart......Page 1874
    Creating a custom Legend control......Page 1878
    Handling user interactions with charts......Page 1881
    Using the HitData object......Page 1883
    Getting chart elements......Page 1886
    Getting data with coordinates......Page 1890
    Changing mouse sensitivity......Page 1895
    Disabling interactivity......Page 1897
    Using standard effect triggers......Page 1899
    Using charting effect triggers......Page 1901
    Charting effects with data series......Page 1902
    Using the SeriesSlide effect......Page 1907
    Using the SeriesZoom effect......Page 1909
    Using the SeriesInterpolate effect......Page 1911
    Applying effects with ActionScript......Page 1913
    Drilling down into data......Page 1923
    Methods of chart item selection......Page 1930
    Region selection......Page 1933
    Keyboard and mouse selection......Page 1934
    Programmatic selection......Page 1935
    About selection events......Page 1948
    Clearing selections......Page 1949
    Using the selection API to create new charts......Page 1950
    Dragging and dropping chart items......Page 1953
    Index......Page 1959