Contents 5
Chapter 11: Use List-based Form Controls. . . . . . . . . . . . . . . . . . 135
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Insert and position controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Populate the list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
Associate values with list items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140
Chapter 12: Use an Event Listener . . . . . . . . . . . . . . . . . . . . . . . . 143
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
Create a simple user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
Write an event listener. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
Associate the listener with an event with MXML. . . . . . . . . . . . . . . . . . 147
Associate the listener with an event with ActionScript . . . . . . . . . . . .148
Chapter 13: Use Behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Create a behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152
Invoke an effect from a different component . . . . . . . . . . . . . . . . . . . . .154
Create a composite effect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Chapter 14: Use View States and Transitions . . . . . . . . . . . . . . . 159
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
Design the base state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
Design a view state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164
Define how users switch view states . . . . . . . . . . . . . . . . . . . . . . . . . . . .168
Create a transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
Chapter 15: Create a Custom Component . . . . . . . . . . . . . . . . . . 175
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Create a test file for the custom component. . . . . . . . . . . . . . . . . . . . . . 176
Create the custom component file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Design the layout of the custom component . . . . . . . . . . . . . . . . . . . . . 179
Define an event listener for the custom component. . . . . . . . . . . . . . .180
Use the custom component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
Chapter 16: Use the Code Editor . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Set up your project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
Create an MXML file to demonstrate code editing features . . . . . . . .188
Use Content Assist. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
Show line numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190
Add a code comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190
Use the Outline view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Komentarze do niniejszej Instrukcji