MXML: Difference between revisions
m (using an external editor) |
m (using an external editor) |
||
Line 1: | Line 1: | ||
== Definition == | == Definition == | ||
MXML is an XML-based user [http://en.wikipedia.org/wiki/User_interface_markup_language interface markup language]. MXML is considered a proprietary standard due to its tight integration with Adobe technologies, in particular [[Flash]]. | |||
The [[Adobe Flex]] developer kit can be use to compile MXML + ActionScript code into Flash. It's a fairly popular technology for developping [[rich internet application]]s (e.g. educational multimedia). | |||
This entry is part of the [[ActionScript]] and [[Flash]] series of articles. | |||
== Introductory example == | == Introductory example == | ||
Line 9: | Line 12: | ||
A basic mxml document would look something like this: | A basic mxml document would look something like this: | ||
File myFirstApplication.mxml : | |||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
Line 26: | Line 29: | ||
</mx:Panel> | </mx:Panel> | ||
</mx:Application> | </mx:Application> | ||
Make sur to respect [[XML]] Syntax (e.g. closing tags). | |||
Put the text above in a text file. Save the text file as "myFirstApplication.mxml". Assuming the Flex framework is properly installed, in the terminal, type | Put the text above in a text file. Save the text file as "myFirstApplication.mxml". Assuming the Flex framework is properly installed, in the terminal, type | ||
Line 33: | Line 38: | ||
SWF files generated by Flex require Flash Player 9 or above. | SWF files generated by Flex require Flash Player 9 or above. | ||
== Links == | |||
* [http://www.adobe.com/devnet/flex/ Flex Developer Center] has a lot of information. Not always obvious to find the best entry point for beginners, but have a look at these (if the links didn't move ...): | |||
** [http://www.adobe.com/devnet/flex/quickstart/coding_with_mxml_and_actionscript/ Coding with MXML and ActionScript] | |||
** [http://www.adobe.com/devnet/flex/quickstart/building_components_in_mxml/ Building components in MXML] | |||
** [http://livedocs.adobe.com/flex/3/html/help.html?content=mxml_1.html Flex Programming Elements] (A manual chapter). | |||
* [http://en.wikipedia.org/wiki/MXML MXML] (Not very useful as of Aug. 2008) | |||
* [http://www.adobe.com/devnet/flex/ Flex | * [http://www.adobe.com/devnet/flex/articles/paradigm.html An overview of MXML: The Flex markup language] by C. Coenraets, Adobe (2004). Outdated, but still useful ! | ||
[[Category: XML]] | [[Category: XML]] |
Revision as of 14:16, 28 August 2008
Definition
MXML is an XML-based user interface markup language. MXML is considered a proprietary standard due to its tight integration with Adobe technologies, in particular Flash.
The Adobe Flex developer kit can be use to compile MXML + ActionScript code into Flash. It's a fairly popular technology for developping rich internet applications (e.g. educational multimedia).
This entry is part of the ActionScript and Flash series of articles.
Introductory example
A Flex program is a text file that contains a combination of xml elements and optionally actionscript instructions.
A basic mxml document would look something like this:
File myFirstApplication.mxml :
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" horizontalAlign="center" verticalAlign="middle" width="300" height="160" > <mx:Panel paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10" title="My First Application" > <mx:Label text="Hello World!" fontWeight="bold" fontSize="24"/> </mx:Panel> </mx:Application>
Make sur to respect XML Syntax (e.g. closing tags).
Put the text above in a text file. Save the text file as "myFirstApplication.mxml". Assuming the Flex framework is properly installed, in the terminal, type
mxmlc myFirstApplication.mxml
Information appears on the screen and about half a second later, if all is well, you get informed that a file "myFirstApplication.swf" has been produced. Open this file in a flash player or in a web browser.
SWF files generated by Flex require Flash Player 9 or above.
Links
- Flex Developer Center has a lot of information. Not always obvious to find the best entry point for beginners, but have a look at these (if the links didn't move ...):
- Coding with MXML and ActionScript
- Building components in MXML
- Flex Programming Elements (A manual chapter).
- MXML (Not very useful as of Aug. 2008)
- An overview of MXML: The Flex markup language by C. Coenraets, Adobe (2004). Outdated, but still useful !