122
Chapter 5: Working with Components
Creating an MXML component file
You create an MXML component file in the same way that you create any new file.
To create a component file:
1.
Select File > New to open the New document dialog box, and then double-click one of the
component options in the Flex Development category.
Flex Builder gives you the option of creating components derived from common container
classes.
2.
Name the component by selecting File > Save As and naming the file.
The filename defines the component name. For example, if you name the file
LoginForm.mxml, the component is named LoginForm. The Flex server uses the spelling and
capitalization of the filename to generate a new class representing the component.
3.
Save the file in the local root folder of your application or in any of its subfolders.
Flex applications can't find components located outside of the application root folder. For
more information on the application root folder, see
“Identifying a Flex application root
folder” on page 11
.
4.
Write the code for the component.
For more information, see “Creating MXML components” in Developing Flex Applications
Help.
5.
Save the component file.
Summary of Contents for FLEX BUILDER-USING FLEX BUILDER
Page 1: ...Using Flex Builder...
Page 116: ...116 Chapter 4 Building a Flex User Interface Visually...
Page 144: ...144 Chapter 6 Working with Data...
Page 154: ...154 Appendix A Basic Flex Concepts...