Flex Quick starts Chinese translation (ii)

Source: Internet
Author: User
Tags command line
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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.