FX, MX, and s namespaces in flex 4

Source: Internet
Author: User

Flex 4 brings us a brand new namespace. Understanding these namespaces must be a good thing. Flex 4 has three important namespaces:

  • Xmlns: FX = "http://ns.adobe.com/mxml/2009 ″
  • Xmlns: MX = "Library: // ns.adobe.com/flex/halo"
  • Xmlns: S = "Library: // ns.adobe.com/flex/spark"

 

1. xmlns: FX = "http://ns.adobe.com/mxml/2009 ″

The FX namespace containsTop-level elements of ActionScriptAndBuilt-in labels in the mxml Compiler.

The former top-level elements of ActionScript refer to objects, numbers, Boolean, and array objects. You can view the complete top-level elements in the top-level package of Adobe Flex 4 beta language reference. The labels built into the mxml compiler in the latter include <FX: SCRIPT>, <FX: declarations>, and <FX: style>, you can view the complete compiler elements in "mxml only tags" in the appendix (appendixes) of Adobe Flex 4 beta language reference.It is worth noting thatThis namespace does not contain halo and spark components (halo is the component library of previous versions, and spark is the new component library of flex 4 ). Find the "mxml-2009-manifest.xml" file under the flash builder installation directory (for example, my computer is C:/program files/Adobe/flash builder beta/sdks/4.0.0/frameworks/mxml-2009-manifest.xml ), this XML file describes the complete top-level class of ActionScript. However, you can note that it does not contain the mxml compiler labels, because these labels are built into the mxml compiler.

2. xmlns: MX = "Library: // ns.adobe.com/flex/halo"

The MX namespace contains the components in the MX. * package, flex charts, and flex data visualization components. If you are familiar with Flex 3, you are no stranger to the components in the MX package. You can find the "halo-manifest.xml" file under the flex 4 SDK installation directory (for example, my computer is C: /program files/Adobe/flash builder beta/sdks/4.0.0/frameworks/halo-manifest.xml), which lists all the components.

3. xmlns: S = "Library: // ns.adobe.com/flex/spark"

The S namespace is nothing new. All the components in the spark. * package are in this namespace. Not only the spark package, but also the text framework class of the flashx. * package is in this namespace. This namespace contains many RPC classes, such as WebService, httpservice, and remoteobject components. These components are also in the MX namespace. That is to say, when creating these components, you can not only use "s: "prefix. You can also use the" mx: "prefix. In fact, not only do these RPC components share two namespaces, such as graphics, effect, and state classes, but also share the S and MX namespaces. Open the spark-manifest.xml file in the flex 4 SDK installation directory to see the complete spark components.

The following lists the classes that share the S and MX namespaces.:

 

Category Class
RPC classes
  • MX. messaging. channels. amfchannel
  • MX. rpc. callresponder
  • MX. messaging. channelset
  • MX. messaging. Consumer
  • MX. messaging. channels. httpchannel
  • MX. rpc. http. mxml. httpservice
  • MX. messaging. Producer
  • MX. rpc. remoting. mxml. remoteobject
  • MX. rpc. remoting. mxml. Operation
  • MX. messaging. channels. rtmpchannel
  • MX. messaging. channels. secureamfchannel
  • MX. messaging. channels. securestreamingamfchannel
  • MX. messaging. channels. securehttpchannel
  • MX. messaging. channels. securestreaminghttpchannel
  • MX. messaging. channels. securertmpchannel
  • MX. messaging. channels. streamingamfchannel
  • MX. messaging. channels. streaminghttpchannel
  • MX. rpc. Soap. mxml. WebService
  • MX. rpc. Soap. mxml. Operation
  • MX. Data. mxml. dataservice
Graphics classes
  • MX. Graphics. bitmapfill
  • MX. Geom. compoundtransform
  • MX. Graphics. gradiententry
  • MX. Graphics. lineargradient
  • MX. Graphics. lineargradientstroke
  • MX. Graphics. radialgradient
  • MX. Graphics. radialgradientstroke
  • MX. Graphics. solidcolor
  • MX. Graphics. solidcolorstroke
  • MX. Graphics. Stroke
  • MX. Geom. Transform
Effedt classes
  • MX. effects. Parallel
  • MX. effects. Sequence
  • MX. States. Transition
  • MX. effects. Wait
States Classes
  • MX. States. State
  • MX. States. additems

To learn more about flex 4, download Adobe Flex 4 help.

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.