
Use the custom component 185
A browser opens and runs the application.
The application displays the LoginBox component you inserted in the main application
file. You can reuse the same component in multiple MXML files.
Click the Login button to verify that the event listener is called properly. The string
“logging in...” should appear to the left of the Login button.
In this lesson, you created a custom MXML component visually, and then used it in an
MXML application file. You designed the component’s layout and defined an event listener
for a control in the component. To learn more, see Chapter 8, “Creating Custom MXML
Components,” on page 161 and Chapter 7, “Creating Simple MXML Components” in
Creating and Extending Flex 2 Components.
Commentaires sur ces manuels