Index

@ (attribute) operator, 131

{} (braces), 81, 89, 98, 176–177

: (colon), 23

= (equal sign), 23

> (greater-than sign), 30

? (question mark), 146

(quotation marks), 68, 97

/ (slash), 30, 31

_ (underscore), 177

" (escape code), 68

.. (descendant) operator, 132

. (dot) operator, 130

A

AATC (Adobe Authorized Training Center), xxii

absolute positioning, 58, 59

ACA (Adobe Certified Associate), xxii

acceptDragDrop() method, 322

ACE (Adobe Certified Expert), xxii

ACI (Adobe Certified Instructor), xxii

action item controls, 303

ActionScript

Array instances, 184–185

classes, 142, 143, 427–429

components (See ActionScript components)

dispatching events in, 178–179

Drawing API, 404

event handling with, 98–99

and Flash Platform, 12, 13

for loops, 162

power of, 12

purpose of, 13

triggering validation from, 363

XML support, 127

ActionScript components, 419–452

adding functionality to, 439–450

choosing base class for, 426

complexity of building, 420

creating visuals for, 432–438

defining, 424–431

overview, 420–422

reasons for making, 422–424

specifying skin requirements for, 432–434

types of, 421

ActionScript Virtual Machine (AVM), 13

addData() method, 322

addEventListener() method, 275

addInts() method, 40

addItem() method, 157, 158, 160, 166–167

Add To Cart button, 158, 161, 167

addToTextArea event handler, 108

Adobe

certification levels, xxii

Certified Associate exams, xxi

Community Help, xx–xxii

Creative Suite, 14

Developer Connection, xxi

Flash (See Flash)

Flex (See Flex)

Labs, xxii

Marketplace & Exchange, xxii

open source site, 81

TV, xxi

Adobe Advanced Training series, xviii

Adobe Flex 4.5 MXML and ActionScript Language Reference (ASDoc), 41, 79, 208, 378

Adobe Integrated Runtime (AIR), 12

Adobe Training from the Source series, xviii

AIR (Adobe Integrated Runtime), 12

AJAX (Asynchronous JavaScript and XML), 8, 9–10

anchors, layout, 59

animation tools, 12

API (application programming interface), 79

Application container, 46

application files. See also applications

basic elements of, 22

comparing versions of, 31–32

creating, 21–22

naming, 21

organizing, 18–24

saving, 31

viewing, 18, 21–22

viewing errors in, 32–33

application programming interface (API), 79

applications. See also application files

building detail view of, 85–87

changing internal structure of, 73–75

controlling view states for, 68–70

customizing with skins, 399–417 (See also skins)

customizing with styles, 375–397 (See also styles)

debugging, 34–41

desktop, 4–5, 311

displaying images in, 81–84

displaying/managing data for, 144–150, 292

dividing into modules, 207

embedding fonts in, 388, 390

enterprise server, 10

evolution of, 3, 4–6

improving architecture of, 213–221

laying out interface for, 50–58

mainframe, 4

maintainability of, 5, 8

minimum height/width for, 24

refactoring, 71–75, 101–103

rich Internet (See RIAs)

running, 28–33

saving, 187

tightly coupled, 262

viewing hierarchy of, 57

web (See web applications)

Web 2.0, xii

working with view states for, 63–70

Application tag, 22–23, 31

architecture

client-side, 95

loosely coupled, 262–263

model-view-controller (MVC), 88, 212–213

page-based, 4, 6–7, 8

service-oriented, 5

arguments, 147

ArrayCollection, 184–203

and cursors, 198

and data binding, 184–185

filtering items in, 202–203

populating, 185–192

sorting items in, 194–198

using data from, 192–193

vs. ArrayList, 246

ArrayList, 185, 246

Array notation, 192

arrays. See also ArrayCollection

and data binding, 183–184

determining number of items in, 202–203

for shopping cart items, 159–167

sorting items in, 194–198

using items in, 192–193

AS3 Drawing API, 404

ASDoc (Adobe Flex 4.5 MXML and ActionScript Language Reference), 41, 79, 208, 378

aspect ratio, 83

asynchronous component model, 439

Asynchronous JavaScript and XML (AJAX), 8, 9–10

attribute (@) operator, 131

attributes, 23, 30, 98

Auto-Generation, 181–183

AVM (ActionScript Virtual Machine), 13

B

base class, 426

BasicLayout object, 47, 58, 90

[Bindable] metadata tag, 135–136, 145, 149, 157, 173, 176–177

bindings, 98. See also data binding

BitMapFill class, 408

boldface text/code, xvi

Boolean values, 151–152, 163

BorderContainer, 46

braces ({}), 81, 89, 98, 176–177

Breakpoint Properties view, 40

breakpoints

enabling conditional, 40

removing, 39, 107

setting, 34, 35, 104, 187

turning on/off, 39

Breakpoints view, 36

browsers, web, 4, 5

bubbling, event, 274–279

Build Automatically option, 28

buildProduct() method, 151, 152, 199

business applications

evolution of, 4–6

maintainability of, 5, 8

role of computers in, 3

button_clickHandler() method, 35, 37

Button control, 57

buttons

creating skin for, 400–404

customizing for different states, 407–413

C

calculateSubtotal() method, 156, 204

calculateTotal() method, 164–165

camel case syntax, 382

capture phase, event flow, 275

CartGrid component, 295–296

Cascading Style Sheets. See CSS

case-sensitivity, 21, 50, 68

categories, filtering products by, 257–259

categories property, 231

CDATA (character data) blocks, 99, 102, 110

CD-ROM, xvii, xviii

centralized data processing, 4

change events, 258, 287–288, 442

change flags, 440

character data (CDATA) blocks, 99, 102, 110

Checkout application, 89–92

Checkout button, 56, 59, 345

checkout form, 89–92

checkout process, 335–358

adding billing info page to, 345–350

creating OrderEvent object for, 355–358

creating OrderInfo object for, 335–336

creating review page for, 350–355

creating user views for, 337–345

overview, 335

validating postal codes during, 369–372

CheckoutView component, 337–345

children, 46, 57, 128

child tags, 49

classes, 141–167. See also specific classes

and ActionScript, 142, 143

basics of building, 143

as blueprint for objects, 141

categories of, 274

constructors of, 143

creating, 141, 154, 427–429

custom, 429–431

defining, 49–50, 143

naming, 143

properties of, 143, 147

reference document for, 41

vs. properties, 49–50

class hierarchy, 208–209

class instances, 49

class keyword, 145

class selectors, 382, 383, 384

clickHandler() function, 99, 100

client/server applications, 3, 4–5, 7

client-side architecture, 95

clone() method, 271

code blocks, xvii

code completion, 109, 110, 150

code hinting, 29, 30, 98

code line numbers, 27

ColdFusion, xiv

CollectionEvent class, 287–288

collections

examples of, 194

filtering items in, 202–203

sorting items in, 194–198

using cursors in, 198–199

colon (:), 23

color

background, 376, 382, 393, 394, 404

highlight, 375, 402

label, 391, 392, 393

logo, 54

rollover, 379–381, 382, 383

text, 378

colorName label, 171

columns

in DataGrid, 292, 294, 297, 299

in layout objects, 46

commitProperties() method, 440, 441, 443

Community Help application, xx–xxii

compiler, 176–183

compiler arguments, 142

compile-time errors, 33, 150

components, 207–238. See also specific components

ActionScript (See ActionScript components)

advantages of, 212

applying styles to, 379–381

broadcasting events from, 263

changing look of, 400–404, 432–438

complexity of building, 420

creating, 105, 209–212, 230–238

creating directory of reusable, 221–230

declaring events for, 267–269

defining, 46, 424–431

drag-and-drop, 313

facilitating use of, 212

generic, 425

hierarchy of, 208–209

list-based, 321

to manage loading data, 230–238

and MVC architecture, 212–213

MXML, 208–213, 420

non-visual, 230–238

positioning, 46, 55

purpose of, 207

specifying skin requirements for, 432–434

types of, 421

visual, 213–230, 274

Components view, 54

composed containers, 72–73

computer applications. See applications

conditional breakpoints, 40

configuration files, 23

constraint-based layouts, 55, 58–63

ConstraintLayout object, 47

constructors, 143, 147, 148, 155–156

containers

combining layout objects and, 48

composed, 72–73

finding, 65

positioning elements in, 58–59

purpose of, 46

size considerations, 62

types of, 46–47

control bars, 51, 53, 57

controllers, 212

controls

accessing properties for, 81

APIs for, 79

assigning IDs to, 81

positioning, 64

simple (See simple controls)

Cookbooks, xxi

cookies, 7

copyright label, 60

createCursor() method, 199

creationComplete event, 107–111

Creative Commons License, 388

CreditCartInfo component, 345–350

cross-domain policy files, 122

CSS (Cascading Style Sheets)

how namespaces are defined by, 389

inheritance, 381

standards, 384

styling with, 377–378, 382

CSS files

creating SWF files from, 395–396

setting styles via, 386–394

sharing between applications, 386

curly brackets ({}). See braces

CurrencyFormatter class, 362–363, 364–368, 443

currentState property, 68

cursors

defined, 198

general steps for using, 198–199

refactoring to search with, 198–201

removing items with, 201–202

custom classes, 429–431

custom components. See also components

advantages of, 212

example, 210–211

facilitating use of, 212

and MVC architecture, 212–213

steps for creating, 209–210

ways of using, 207, 282

custom event classes, 269–270

D

data. See also datasets

allowing users to interact with, 292

in ArrayCollections, 192–193

creating components to manage loading, 230–238

debugging, 149

from event objects, 100–103

externalizing, 114–116

filtering, 202–203

manipulating shopping cart, 159–167

modifying, 109–111

nodes vs. attributes, 186

passing, when calling event handler, 99–100

passing, with events, 269–270

retrieving, 108, 120, 126

security issues, 122–123

data binding, 169–205

and arrays, 183–184

binding simple controls using, 81

breaking complex, 173–176

breaking simple, 170–173

curly bracket syntax for, 81, 89 (See also braces)

as events, 179–181

and Flex formatters, 362, 363

implications of, 183–184

importance of, 170

linking data structure to simple control using, 88–89

populating text controls using, 81

proxying strategy, 184–185

purpose of, 88

two-way, 334

dataChanged event, 249

dataForFormat() method, 322

DataGrid, 291–309

adding, 65–67

considerations, 292

default behavior of, 299

displaying shopping cart with, 292–308

dragging/dropping between List and, 315–321

purpose of, 292

DataGroup, 245–255

creating custom renderer for, 450–452

creating ProductList from, 282–285

enabling virtualization for, 254–255

implementing itemRenderer, 246–251

purpose of, 242

simple example, 245–246

using in ShoppingView, 251–253

vs. Group class, 245

data models, 88

data nodes, 186

data persistence, 15

dataProvider property, 242

DataRenderer class, 251, 256, 450

datasets

defined, 241

populating List control with, 242–245

using DataGroup with, 245–246

virtualization of, 254

data structures, 81

data transfer objects (DTOs), 143

debugger, 34–41, 104

debugging. See also breakpoints; errors

data binding, 171–172, 175

data structures, 149

example, 34–41

and Local History feature, 31–32

rolling back to previous versions, 31–32

Debug perspective, 105

Debug view, 35, 38–39

Declarations tag, 29

DefaultItemRenderer class, 246

default state, 63

descendant (..) operator, 132

descendant selectors, 382, 390–391

Design button, 22

Design view, 25, 53–56

desktop applications, 4–5, 311

detail view, 85–87

DHTML (Dynamic HTML), 5, 9

dispatchEvent() method, 263, 270

dispatching events, 178–179, 183, 263–267

display list, 274

DisplayObjects, 274

Document Object Model (DOM), 5

doDrag() method, 322

DOM (Document Object Model), 5

dot-com boom, 7

dot operator, 130

double quotes (), 97

Drag and Drop Manager, 311, 312–313

dragComplete event, 315

dragDrop event, 316

drag/drop operations, 311–331

between DataGrid and List, 315–321

and HTML, 4–5

phases, 312

in shopping cart, 326–331

terminology, 312

between two lists, 313–315

using non-drag-enabled component in, 321–326

dragEnabled property, 313, 314, 315

dragEnter event, 316

DragEvents, 101

dragExit event, 316

drag initiator, 312, 315

DragManager class methods, 322

dragOver event, 316

drag proxy, 312

drag source, 312

DragSource class, 312, 314, 315, 322

Drawing API, AS3, 404

drawRect() method, 406

dropEnabled property, 313, 315

drop target, 312, 316

DTOs (data transfer objects), 143

dumb terminals, 4

Dynamic HTML (DHTML), 5, 9

dynamic interfaces, 71

dynamic XML data, 133–137

E

E4X (ECMAScript for XML), 127–133

Eclipse platform, 14, 17, 36

Eclipse project, 10, 14

ECMAScript for XML (E4X), 127–133

ECMA standard, 127

e-commerce application. See also FlexGrocer application

laying out, 50–58

using drag and drop in, 311–331

working with view states in, 63–70

editors

defined, 24

example, 22

expanding, 25

inline, 296–299

opening/closing, 24

showing code line numbers in, 27

viewing errors in, 32–33

element selectors, 382

embedded fonts, 388, 390

embedded XML, 114–119

@Embed directive, 84

end users, 8

enterprise server applications, 10

equal sign (=), 23

error messages, 89

errors. See also debugging

and Build Automatically option, 28

how Flash Builder reports, 27

viewing, 32–33

escape code ("), 68

event-based programming model, 95, 96–97

event bubbling, 274–279

Event class, 100, 269–270

event dispatchers, 96. See also dispatching events

event flow, 275

event handlers

defined, 96

naming, 104, 285

passing data when calling, 99–100

sending event objects to, 101–103

for system events, 107–111

event handling

with ActionScript, 98–99

example, 97–98

overview, 96–97

EventLab application, 274

event listeners, 96, 179, 275, 288

event objects. See also events

generic, 101

inspecting, 104–107

using data from, 100–103

events, 100–107. See also event handling; event objects

communicating with, 445–448

data binding as, 179–181

declaring, 267–269

defined, 100

dispatching, 178–179, 183, 263–267

drag initiator, 315

drop target, 316

inspecting, 104–107

interpreting, 212

listening to, 96, 179

passing data with, 269–270

purpose of, 80

types of, 96, 107

using data from, 100–103

event subclasses, 270–274, 280

event targets, 275

eventText parameter, 108

event variable, 105

expressions

E4X, 129, 133

and loose coupling, 262

maintaining, 262

watch, 36, 117, 119, 136, 172, 191

Expressions panel, 173, 191

Expression Studio, 11

Expressions view, 36, 118, 137, 191

Extensible Application Markup Language (XAML), 11

F

factory methods, 150

false/true values, 151–152, 163

FAQs (frequently asked questions), xxi

FedEx shipment tracking application, 8

fill property, 408

filterCollection() method, 258

filtering, 202–203

filterOrganic() method, 203

findAny() method, 200

findFirst() method, 199–200

findLast() method, 200

Flash Builder

adjusting layout of views in, 26

basic vocabulary for, 18

creating projects in, 18–24

debugger, 34–41

deleting projects in, 41–42

displaying code line numbers in, 27

enabling conditional breakpoints in, 40

help/support, xxi

importing projects into, 41

laying out interface in, 45

naming projects in, 18–19

and object-oriented best practices, 95

purpose of, 14, 17

using Auto-Generation with, 181–183

versions, 14

viewing/correcting errors in, 32–33, 34–41

workbench, 24–27

Flash Catalyst, 14

Flash Debug perspective, 26

Flash Platform, 12–15

Flash Player

and AIR, 12

and application height/width, 24

compilation process, 14

evolution of, 12

how it works internally, 439

popularity of, 12

and runtime-loaded CSS files, 395

sandboxes, 122–123

as single-threaded virtual machine, 439

versions, 13–14

Flash Professional, 12–13

Flash Text Engine, 81

Flex

application architecture, 212–213

application development, 18–24

applications (See applications)

basic vocabulary for, 18

Community Help, xx–xxii

compiler, 176–183

as component-based development model, 207

components, 421–422

event-based programming model, 95, 96–97

getting started with, xii–xiii, 17–43

home page, xxii

key technologies, 13–14

language tags, 23

and object-oriented programming, 41

positioning of components in, 46

purpose of, xii, 13

resources, xx–xxii

Spark components, 23

versions, xii, 13

working with view states in, 63–70

FlexGrocer application

adding events to, 95

building checkout process for, 335–358

controlling view states for, 68–70

creating list of products for, 185–191

creating/organizing files for, 18–24

customizing with skins, 399–417 (See also skins)

customizing with styles, 375–397 (See also styles)

defining product section for, 57–58

displaying images in, 81–84

displaying/managing data for, 144–150

externalizing data in, 114–116

formatting currency for prices in, 364–369

implementing checkout process for, 333–358

implementing drag/drop in, 326–331

improving architecture for, 213–221

laying out interface for, 50–58

manipulating shopping cart data for, 159–167

modifying, 30–33

overview, xv

Product data structure for, 141

providing product/category information for, 230–238

refactoring, 73–75, 101–103

running, 28–29

validating postal codes for, 369–372

visual shopping cart for, 169 (See also shopping carts)

website for, xvi

working with view states for, 63–70

flexgrocer.com, xvi

Flex Properties view, 82–83

Flex SDK, xii, xiii, 14, 19, 23, 80

flow-driven programming model, 96

fonts, embedded, 388, 390

for loops, 162–163, 164–165

Formatter classes, 364–368

formatters

for displaying currency, 364–368, 443

examples of, 362–363

purpose of, 361, 363

Form container, 47, 81, 89–92

form fields, 89

FormHeading component, 91

FormItem component, 90

FormLayout object, 47

forms, 89, 91

Forums, Adobe, xxii

FreeBSD, 11

frequently asked questions (FAQs), xxi

functions. See also specific functions

parameters vs. arguments for, 147

private vs. protected, 267

scope of, 102

vs. methods, 144

</fx:Declarations> tag, 29

FXG Graphics, 404–405

FXG specification, 407

<fx:Metadata> tag, 267–268

<fx:Model> tag, 88

fx namespace, 23

FXP files, 34, 41

<fx:Script> block, 99

<fx:Style> tag, 382–383

<fx:XML> tag, 149, 151

G

Generate Getter/Setter dialog box, 182, 249, 428

getItemAt() method, 192–193

getItemInCart() method, 163

getters/setters, 177–178, 181–183, 249, 428

Google Maps, 10

“go to definition” shortcut, 171

graphical elements, 46, 404–405

graphics editing programs, 404–405

graphics property, 404–405

greater-than sign (>), 30

GridColumn class, 296–299

Group container, 46, 245

Group tag, 48–49

H

handleCreationComplete() method, 109, 149, 152

handleViewCartClick() method, 102, 103, 104

hasFormat() method, 322

HGroup container, 72–73

HorizontalLayout object, 47

HostComponent metadata, 433

HTML (Hypertext Markup Language)

and drag/drop operations, 5

latest version of, 10

limitations of, 4–5, 10

as page-based architecture, 4

HTML 5 specification, 10

HTTP (Hypertext Transport Protocol), 5, 7

HTTPServices

accessing data retrieved from, 121–122

creating, 120, 230–231

retrieving XML data via, 124–126

Hypertext Markup Language. See HTML

Hypertext Transport Protocol (HTTP), 5, 7

I

IDataRenderer interface, 246, 247

IDE (integrated development environment), 14

ID selectors, 382, 392

IFill interface, 408

IFormatter interface, 362

IFrames, 9

Image control, 81–84

images

displaying, 81–84

editing, 404–405

loading at runtime, 81

loading at start of application, 84

scaling, 83

implicit getters/setters, 177–178, 181–183

importing

classes, 109–110, 215

projects, 41, 68

import statements, 110, 157, 304

includeIn property, 67, 87, 334

inheritable style properties, 381

inheritance

hierarchy, 263

and invalidateProperties() method, 440

and protected functions, 267

style, 376, 381, 384

inline editors, 296–299

inline item renderers, 303–304

inline styles, 379–381

instance methods, 151

instances

Array, 184, 194

bindable, 194

DataGroup, 242

event, 276, 277

Label, 193

List, 242, 313

Object, 184

ObjectProxy, 118, 135

validator, 371

vs. properties, 49

XML, 184

integers, unsigned, 155

integrated development environment (IDE), 14

interactivity, 5, 63

interfaces, 199. See also UI

Internet

applications (See web applications)

dot-com boom, 7

explosive growth of, 4

security issues, 122–123

invalidateProperties() method, 440

isItemInCart() method, 163

italics, xvii

itemEditor property, 297

item editors, 296–299

itemRenderer class, 246–251, 256

item renderers

for displaying products, 299–302

how they work, 246

implementing, 246–251

inline, 296–299, 303–304

items. See also products

adding to shopping cart, 159–161

displaying based on category, 257–258

dragging to shopping cart, 311, 326–331

finding in shopping cart, 161–163

updating quantity of, 161, 164–166

IT organizations, 8

IValidator interface, 363

IViewCursor interface, 198, 199

J

Java, xiv

Java applets, 9

JavaFX, 10

JavaScript, 5, 9

Java Virtual Machine, 10

just-in-time (JIT) compilation, 14

K

keyboard shortcuts, xvii

L

Label component, 378

Label controls, 57, 60, 80

labelFunction property

displaying subtotal with, 305–308

purpose of, 242

using with lists, 242–245

label property, 49

Label tag, 29

lastResult property, 121–122

layout anchors, 59

layout objects, 46, 47–48

layout property, 48

layouts, 45–63. See also containers

adding elements in Design view, 53–56

combining containers and, 48

constraint-based, 55, 58–63

for e-commerce application, 50–58

purpose of, 46

starting in Source view, 51–53

lessons

directory structure for, xviii

list of, xiv–xv

minimum system requirements, xix

standard elements used in, xvi–xvii

letterbox scale mode, 83, 84

Linear Gradient class, 408–409

line breaks, 31

Linux, 11

list-based components, 321

List controls. See also lists

displaying category data with, 137–139

dragging/dropping between, 313–315

dragging/dropping between DataGrid and, 315–321

populating with dataset, 242–245

using labelFunction with, 242–245

lists. See also List controls

formatting data in, 244–245

responding to user’s choice from, 257–259

virtualization with, 255–257

Local History feature, 31–32

loops, 162–163, 164–165

loosely coupled architecture, 262–263

M

Mac OS-based systems

manifest files for, 23

and Silverlight, 11

system requirements, xix

Macromedia, xii, 12, 13

mainframes, 4

Major League Baseball application, 8

manifest files, 23

menu commands, xvii

messaging, 15

metadata tags, 267

methods. See also specific methods

creating objects with, 150–153

defining, 143

DragManager class, 322

DragSource class, 322

factory, 150

instance, 151

overriding, 271

parameters vs. arguments for, 147

static, 151

vs. functions, 144

microcomputers, 4

Microsoft

Expression Studio, 11

Silverlight, 11

minHeight attribute, 31

minWidth attribute, 31

MLB.TV Media Player, 8

models, 212

model-view-controller (MVC) architecture, 88, 212–213

Moonlight, 11

mouseDown event, 315

MouseEvent properties, 104–107

mouseMove event, 315

mouseOut event, 87

mouseOver event, 87

multiDisplay() function, 244

MVC (model-view-controller) architecture, 88, 212–213

mx components, 20

mx.formatters package, 362

MXML

case-sensitivity of, 21

class instances vs. properties in, 49–50

compiling, 149

components, 208–213, 420 (See also components)

creating applications in, 18–24

creating classes in, 149

decoding tags in, 49–50

formatting rules/standards, 30

item renderers, 303–304

purpose of, 13

MXMLC compiler, 395

MXML Component dialog box, 214

mx.validators package, 363–364

N

name collision, 147, 148

@namespace declaration, 389

namespaces

fx namespace, 23

how CSS defines, 389

s namespace, 23

Spark, 23, 387, 389

styles and, 383–384

navigation system

importance of, 333

and loose coupling, 262–263

using states as basis for, 334, 337–345

nested quotes, 97, 99

.NET, xiv, 11

new keyword, 151

New Package command, 221

New State icon, 64

newTotal variable, 164, 165

nodes, 128, 186

non-visual components, 230–238

O

object-oriented programming (OOP), xiv, 41, 95, 102, 141, 215

ObjectProxy, 184

objects

building method to create, 150–153

classes as blueprint for, 141

converting XML to, 117–119, 133

data transfer, 143

event (See event objects)

OOP. See object-oriented programming

Open Font Library, 388

Open Perspective button, 22, 26

Open Perspective icon, 107

open source site, 81

OrderEvent object, 355–358

OrderInfo object, 335–336, 355

Outline view, 57, 65

P

Package Explorer, 22, 25, 41, 145

package keyword, 145

packages, 143, 145, 221

page-based architecture, 4, 6–7, 8

Panel container, 46

parameters, 147

partAdded() method, 445–448

partRemoved() method, 445, 448–449

PC manifest files, 23

personal computers, 4

perspectives, 26, 36, 107

PHP, xiv

postal-code validator, 369–372

prefix, 23

prepare method, 300, 301

private functions, 267

private keyword, 158

Problems view, 22, 32

ProductEvent class, 280–286, 304–305

ProductItem components

breaking out, 221–230

cleaning up appearance of, 376–377

creating instances of, 228

productivity, 8

ProductList component

creating, 282–284, 426

styling labels in, 391

using, 284–285

product nodes, 186

products. See also items

adding/removing from shopping cart, 284–286, 304–305

creating, 189

displaying names of, 148–149

filtering based on category, 257–259

keeping track of shopping cart, 154–159

product section, 57–58

programmatic graphics, 404–405

programming languages, xiv

Project menu, 28

projects. See also applications

creating, 18–24

deleting, 41–42

importing, 41, 68

naming, 18–19, 41

overwriting, 41

viewing, 21–22

viewing errors in, 32–33

properties. See also specific properties

creating, 215

declaring, 143

vs. class instances, 49

Properties panel, 53, 57

protected functions, 267

proxies

array, 184–185

drag, 312

pseudo-selectors, 382, 393–394

public properties, 146–147

Q

question mark (?), 146

Quick Fix tool, 146, 180

quotation marks (), 68, 97

R

RadialGradient class, 408

redundancy, 71

refactoring, 71–75

applications, 73–75, 101–103

benefits of, 71–72

defined, 71

to search with cursor, 198–201

ShoppingCart class, 287–288

ShoppingCartItem class, 204–205

remote XML data, 110–139

dynamic, 133–137

embedded XML, 114–116

searching with E4X, 127–133

security issues, 122–123

XMLListCollection, 137–139

XML loaded at runtime, 119–123

Remove button, 303–304

removeItem() method, 304

Reset Perspective command, 53

ResultEvents, 101

result handler, 122

Resume button, 38

return types, 99, 102

RIAs (rich Internet applications), 3–15

advantages of, 7–8

and drag/drop technique, 311

examples of excellent, 8

functions of, 5–6

goals of, 6–7

technology choices, 8–14

vs. traditional web applications, 6–7

RichEditableText control, 81

rich Internet applications. See RIAs

RichText control, 80, 81, 86, 109

rollover event, 85–87

root nodes, 128–129

Run button, 22, 28, 29

runtime

changing CSS at, 395–397

changing skins at, 448

loading images at, 81, 84

styling at, 395–397

XML loaded at, 119–123

S

sandboxes, 122–123

<s:Application> tag, 22–23, 31

satellite navigation system, 262–263

<s:BasicLayout/> tag, 52

scalar values, 98

Scale Mode menu, 83, 84

scope, 102

Script blocks, 99, 102

scroll bars, 24

Scroller tag, 48–49

scrolling content, 48–49

SDK (software development kit), xii, xiii, 14, 19, 23, 80

searches

array, 246

with cursor, 198–201

descendant, 190

XML (with E4X), 127–133

security issues, 122–123

security sandboxes, 122–123

selectability, 255

selectedIndex property, 255

selectedItem property, 255

self-closing tags, 31, 51

send() method, 120, 126

servers, 4. See also client/server applications

server-side languages, xiv

server-side objects, 6

server technologies, 15

service-oriented architecture (SOA), 5

setStyle() method, 381

setters/getters, 177–178, 181–183, 249, 428

<s:FormHeading> tag, 89

<s:FormItem> tag, 89

<s:Form> tag, 89

shipment tracking application, 8

ShoppingCart class. See also shopping carts

building, 154–159

refactoring, 287–288

replacing Array in, 194

ShoppingCartItem class, 154–159, 204–205

shopping carts

adding items to, 63, 159–161, 284–286

displaying with DataGrid, 291, 292–308

dragging items to, 311, 326–331

finding items in, 161–163

formatting list data for, 244–245

keeping track of items in, 154–159

manipulating data in, 157, 159–167

removing items from, 201–202, 284–286

updating quantity of items in, 164–166

updating totals in, 287–288

ShoppingList component, 425–452

adding functionality to, 439–450

checking functionality of, 429–431

choosing base class for, 426

creating class for, 427–429

creating custom renderer for, 450–452

creating skin for, 434–438

defining interface for, 425

specifying skin requirements for, 432–434

ShoppingView class, 251–253

Show Line Numbers command, 27

Show View command, 25

Silverlight, 11

simple controls, 79–92

linking data structure to, 88–89

overview, 80–81

purpose of, 80

tools for laying out, 79

using Form container to lay out, 89–92

ways of using, 79, 80

SkinnableComponent class, 421–422, 445

SkinnableContainer, 46

SkinnableDataContainer, 47

skinning, 46, 432

SkinPart metadata, 432

skin parts, 401, 434

skins, 399–417

changing at runtime, 448

creating, for Application component, 413–416, 434–438

creating, for FlexGrocer button, 400–404

creating, for ShoppingList component, 434–438

creating renderer for, 450–452

customizing button states with, 407–413

errors, 401

purpose of, 376

relationship between states and, 404–413

role of, in Spark components, 400–404

vs. styles, 376

SkinState metadata, 432–433

<s:Label> tag, 29

slash (/), 30, 31

<s:List> control, 137–138

s namespace, 23

SOA (service-oriented architecture), 5

software development kit (SDK), xii, xiii, 14, 19, 23, 80

software upgrades, 4

SolidColor class, 408

someColor property, 171–172

SortField objects, 194–197

Source button, 22

Source view, 25, 51–53

Spark classes, 23

Spark components

and embedded fonts, 390

namespace for, 23, 387, 389

role of skins in, 400–404, 413

vs. MX components, 20

spark.formatters package, 362

Spark namespace, 23, 387, 389

spark.validators package, 363–364

<s:states> tag, 337

stateless protocols, 7

states

controlling, 68–70

creating, 64

creating navigation structure using, 334, 337–345

maintaining, 7

naming, 68

relationship between skins and, 404–413

setting properties for, 67

state selectors, 393–394

static methods, 151

Step Into button, 37, 40

Step Over button, 37, 40

stretch scale mode, 83

style inheritance, 381

StyleManager, 396–397

styleName property, 383

style properties, 379, 381

styles, 375–397. See also skins

assigning multiple, 382, 397

complete list of, 378

CSS inheritance for, 381

overriding, 397

purpose of, 376

at runtime, 395–397

setting with CSS files, 386–394

setting with <fx:Style> tag, 382–383

setting with setStyle() method, 381

setting with tag attributes, 379–381

vs. skins, 376

ways of applying, 377–378

subclasses, 270–274, 280

subtotals, 156, 204, 305–308

Support pages, xxi

SWF files, 29, 395–396

system events, 96, 107–111

system requirements, xix

T

tag attributes, setting styles via, 379–381

tags

choosing attributes for, 30

Form container, 89

selecting, 30

self-closing, 31, 51

target phase, event flow, 275

target property, 100, 105

targets, event, 275

text

controls, 80–81

displaying blocks of, 85–87

styles for manipulating, 378–379

TextArea component, 80, 108

TextInput control, 80, 91, 247

Text Layout Framework (TLF), 81

this keyword, 105, 147

tight coupling, 262

TileLayout object, 47

timestamp property, 270–274

timestamps, 269

TLF (Text Layout Framework), 81

toString() method, 148–149, 150, 151, 156, 160

total property, 165, 166

trace() method, 149, 150, 153, 156

training centers, Adobe, xxii

Training from the Source series, xviii

transfer objects, 143

true/false values, 151–152, 163

tutorials, xxi

two-way bindings, 334

type property, 100

type selectors, 382, 383–385

U

UI (user interface), 45–76

arranging elements in, 58

drag-and-drop technique, 311 (See also drag/drop operations)

dynamic, 71

for e-commerce application, 45

HTML limitations, 4–5

laying out, 50–58

tools for creating, 11

UIComponent class, 208, 263, 421

underscore (_), 177

unique identifier (UUID), 41

unitRPCResult() handler, 122

Universal Resource Identifier (URI), 23

unsigned integers, 155

updateItem() method, 164

URI (Universal Resource Identifier), 23

URLs, 23, 120

UserAcknowledgeEvent class, 270–274

user events, 96, 97, 107

user frustration level, 8

user input forms, 334

user interface. See UI

users, collecting information from, 89

UUID (unique identifier), 41

V

Validator classes, 363, 364, 369–372

validators

for checking postal codes, 369–372

examples of, 363–364

purpose of, 361, 363

value objects, 143–150, 153

values

attribute, 98

Boolean, 151–152, 163

scalar, 98

setting/reading, 177

true/false, 151–152, 163

variables

controlling, 363

integer, 35

name collision among, 147

naming, 147

in RIAs, 7

showing current state of, 36

Variables view, 36, 37–38, 105

vector graphics, 404–405

VerticalLayout object, 47, 57

VGroup container, 72–73, 85

video publishing, 15

View Cart buttons, 101–103

views

adjusting layout of, 26

displaying list of, 25

grouping, 36

in MVC architecture, 212, 213 (See also specific views)

opening/closing, 25

view states, 63–70

controlling, 68–70

creating, 63–67

defined, 63

naming, 68

virtualization

implementing, 254–255

with List class, 255–257

power of, 255

purpose of, 253–254

visual components, 213–230, 274

void return type, 99, 102

W

WarningDialog application, 264–267

watch expressions, 36, 117, 119, 136, 172, 191

Web 2.0, xii

web applications. See also applications

connectivity issues, 6

and drag/drop technique, 311

and event-based programming, 95

evolution of, 4–6

flow for traditional, 6–7

inefficiencies of, 6

maintaining state in, 7

web browsers, 4, 5

Web Services, 6

Window menu, 25

Windows-based systems

manifest files for, 23

and Silverlight, 11

system requirements, xix

Windows Presentation Foundation (WPF), 11

workbench, 24–27

workflow engines, 15

World Wide Web, xiv. See also Internet

WPF (Windows Presentation Foundation), 11

X

XAML (Extensible Application Markup Language), 11

XML

ActionScript support for, 127

and AJAX, 9

and code completion, 150

converting to objects, 117–119, 133

embedded, 114–119

and Flex, 13

formatting rules/standards, 30

loaded at runtime, 119–123

namespaces, 23

nomenclature, 23

terminating tags in, 31

vs. XMLList, 128

XML class, 127

XML data

accessing returned, 121–122

dynamic, 133–137

remote (See remote XML data)

retrieving via HTTPService, 124–126

security issues, 122–123

XMLDocument class, 127

XMLHttpRequest, 9

XMLList, 128

XMLListCollection, 133, 135, 137–139

Z

zip-code validator, 369–372

ZipCodeValidator class, 369–372

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset