Flex 3 SDK Vs. Flex 4 SDK – Part 1 – Namespaces

Flex 4 added some namespaces, while it still supports the Flex 3 namespaces. This can cause some confusion, more so since some classes are part of two namespaces.

While Flex3 used only one namespace (xmlns:mx=”http://www.adobe.com/2006/mxml”), Flex4 uses 3 namespaces:
xmlns:fx=”http://ns.adobe.com/mxml/2009″
xmlns:s=”library://ns.adobe.com/flex/spark”
xmlns:mx=”library://ns.adobe.com/flex/mx”
Note, that while there’s still a mx namespace, the URI is different.

Each namespaces defines a component set. The old Flex3 mx namespace is still active but if you use it Flex 4 features will not be available.

The fx:namespace includes top-level AS building blocks such as Object, Array etc. but does not include any of the mx or spark component sets. It also includes some mxml tags, like <fx:script>, <fx:style> and <fx:declarations>.

The new mx: namespace includes all of the components in the Flex mx.* packages, the Flex charting components, and the Flex data visualization components.

The s: namespace includes all of the components in the Flex spark.* packages and the text framework classes in the flashx.* packages.
It also includes a subset of the mx: namespace such as the RPC classes for the WebService, HTTPService, and RemoteObject components and additional classes to support the RPC components as well as several graphics, effect, and state classes from the mx.* packages.

Back to the series home page

Advertisements

One Response to Flex 3 SDK Vs. Flex 4 SDK – Part 1 – Namespaces

  1. Mac Adobe says:

    Mac Adobe…

    […]Flex 3 SDK Vs. Flex 4 SDK – Part 1 – Namespaces « Flex Black Belt[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: