Flex Quick Starts Chinese translation (2)
MXML document is because ordinary XML documents, there is a lot of development environment for your choice. You can use a simple text editor, specialized XML editor or text editor to support the Integrated Development Environment (IDE) to prepare MXML code. Flex provides a called Adobe ® Flex ™ Builder ™ 2 specialized IDE, you can use to develop your application.
MXML document is the first line of XML statement. Each of the first row MXML document must be XML statement. Next line is <mx: Application> tags, which define the Application containers, and it is a Flex application's root tag.
<mx:Panel> Panel labels definition of a container, which contains a title bar, a title, a state information, a frame, as well as provide a place of the contents of containers or regional space. Its title (title) the value of the attribute is set to "My Application."
<mx:Label> Label defines a Label control, it is a show that the text can be very simple user interface components. Its text attribute is set to "Hello, World!."
<mx:Label> Labels fontWeight and fontSize attribute the change in the use of font styles. You can also use CSS components you add to the style.
For more information, see Guide to Flex developers in the "use of Cascading Style Sheets (CSS)." NOTE: You can use the command line compiler mxmlc or Flex Builder 2 to compile your Flex procedures.
Mxmlc compiler on the use of the steps, see "use of MXML and ActionScript programming" (universe: I have to assuring 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 = "300" height = "160">
<Mx: Panel
PaddingTop = "10" paddingBottom = "10" paddingLeft = "10"
PaddingRight = "10"
Title = "My Application">
<mx:Label Text="Hello World!" fontWeight="bold" fontSize="24"/>
</ Mx: Panel>
</ Mx: Application>
Picture shows the results:> 
Universe: As the document can not be embedded SWF files, code operating results please see the corresponding part of the original.
Tags: css Chinese manual






Leave a Reply