MACROMEDIA FLEX-GETTING STARTED WITH FLEX Getting Started page 36

Table of Contents

Advertisement

Naming MXML files
MXML filenames must adhere to the following naming conventions:
Filenames must be valid ActionScript identifiers, which means they must start with a letter or
underscore character (_), and they can only contain letters and numbers and underscore
characters after that.
Filenames must not be the same as ActionScript class names, component
word application. Do not use filenames that match the names of MXML tags that are in the mx
namespace.
Filenames must end with a lowercase .mxml file extension.
Using tags that represent ActionScript classes
An MXML tag that corresponds to an ActionScript class uses the same naming conventions as the
ActionScript class. Class names begin with a capital letter, and capital letters separate the words in
class names. For example, when a tag corresponds to an ActionScript class, its properties
correspond to the properties and events of that class.
Setting component properties
In MXML, a component property uses the same naming conventions as the corresponding
ActionScript class. A property names begins with a lower case letter, and capital letters separate
words in the property names. You can set the values of properties using tag attributes or child tags.
Macromedia recommends that you assign scalar values and simple binding expressions as
attributes and that you assign complex types as child tags. Each of a component's properties is one
of the following types:
Scalar properties, such as a number or string
Array of scalar values, such as an array of numbers or strings
ActionScript object
Array of ActionScript objects
ActionScript properties
XML data
Style properties
Scalar properties
You usually specify the value of a scalar property as a property of a component tag, as the
following example shows:
<Label width="50" height="25" text="Hello World"/>
Note: A tag property cannot consist of the @ character followed by one or more characters.
36
Chapter 2: Using MXML
values, or the
id

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-GETTING STARTED WITH FLEX and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents