Macromedia flex builder-using flex builder User Manual
148
Appendix A: Basic Flex Concepts
To escape an ActionScript block, enclose it within a CDATA block. A CDATA block is an XML
technique used to escape character data from the XML parser. The block is created as follows in
the code:
technique used to escape character data from the XML parser. The block is created as follows in
the code:
<![CDATA[
...
]]>
The parser ignores everything in the CDATA block, including special symbols, strings, and
numbers. The Flex compiler can still read and compile the ActionScript in the block. The
following example shows the technique:
numbers. The Flex compiler can still read and compile the ActionScript in the block. The
following example shows the technique:
<mx:Script>
<![CDATA[
var myVar:Number;
function doSomething() {
function doSomething() {
myVar = myVar + 1;
}
]]>
</mx:Script>
Related topics
•
•
•
Flex ActionScript Language Reference help
About Flex containers, components, and controls
Building a Flex user interface consists of inserting Flex containers, components, and controls in
an MXML file.
an MXML file.
This section covers the following topics:
•
•
•
Flex components
Flex includes a component-based development model that you use to develop your application
and its user interface. You can use the prebuilt components included with Flex, you can extend
components to add new properties and methods, and you can create new components as required
by your application.
and its user interface. You can use the prebuilt components included with Flex, you can extend
components to add new properties and methods, and you can create new components as required
by your application.
Components are extremely flexible and allow you a large amount of control over the component’s
appearance, how the component reacts to user interactions, the font and font size of any text
included in the component, the size of the component in the application, and many other
characteristics.
appearance, how the component reacts to user interactions, the font and font size of any text
included in the component, the size of the component in the application, and many other
characteristics.