Chinese
Because the MXML file is an ordinary XML file, there are many development environments for you to choose from. You can write MXML code using a simple text editor, a dedicated XML editor, or an integrated development environment (IDE) that supports text editing. Flex provides a dedicated IDE called adobe®flex™builder™2, which you can use to develop your application.
The first line of the MXML file is the XML declaration. The first line of each MXML file must be an XML declaration. The next line is the <mx:Application> tag, which defines the application container, and it is the root tag for each flex application.
The <mx:Panel> tag defines a Panel container that contains a title bar, a title, a status message, a border, and a content area for placing a child container or space. The value of its title (title) attribute is set to "my application."
The <mx:Label> label defines a label control, which is a very simple user interface component that can display text. Its Text property is set to "Hello, world!".
The FontWeight and FontSize properties of the <mx:Label> labels change the style used for fonts. You can also use CSS to add a style to your component.
For more information, see "Using Cascading Style Sheets (CSS)" In the Flex Developer's Guide. Note: You can compile your flex program using the command line compiler MXMLC or Flex Builder.
For steps on using MXMLC to compile a program, see " Programming with MXML and ActionScript " (I have translated this into Chinese).
Example
<?xml version= "1.0" encoding= "Utf-8"?
<mx:application
xmlns:mx= "Http://www.adobe.com/2006/mxml"
Viewsourceurl= "Src/helloworld/index.html"
horizontalalign= "center" verticalalign= "Middle"
Width= "height=" "160"
<mx:panel
paddingtop= "paddingbottom=" paddingleft= "10"
Paddingright= "10"
Title= "My Application" > >
<mx:label text= "Hello world!" Fontweight= "Bold" fontsize= "24"/>
</mx:panel>
</mx:application>
Run Results Diagram:>
As the SWF file cannot be embedded in the document, the code runs the results to see the appropriate section in the original.