The following example shows how you specify an anonymous object as the value of the
property:
dataProvider
<mynamespace:MyComponent>
<mynamespace:dataProvider>
<mx:Array>
<mx:Object label="One" data="1" />
<mx:Object label="Two" data="2" />
</mx:Array>
</mynamespace:dataProvider>
</mynamespace:MyComponent>
Properties that contain XML data
If a component contains a property that takes XML data, the value of the property is an XML
fragment to which you can apply a namespace. In the following example, the
the MyComponent object is XML data:
<mynamespace:MyComponent>
<mynamespace:value xmlns:a="http://www.example.com/myschema">
<mx:XML>
<a:purchaseorder>
<a:billingaddress>
...
</a:billingaddress>
...
</a:purchaseorder>
</mx:XML>
</mynamespace:value>
</mynamespace:MyComponent>
Style properties
A style property of an MXML tag differs from other properties because it corresponds to an
ActionScript style property that you set in ActionScript using the
method rather than
)
properties in the following example:
<mx:TextArea id="myText" text="hello world" fontFamily="Tahoma"/>
are equivalent to the following ActionScript code:
// text property:
myText.text= "hello world";
// font style property:
myText.setStyle("fontFamily", "Tahoma");
object.property=value
setStyle(
notation. The
and
text
Basic MXML syntax
property of
value
,
fontFamily
39
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