Dealing with namespaces while porting code from Flex 3 to 4

Flex 3 components use  namespace defined as xmlns:mx=“http://www.adobe.com/2006/mxml”. If you’ll create an application in Flex 4, it uses another namespace: xmlns=”http://ns.adobe.com/mxml/2009”, and the prefix mx: is not defined there and causes compilation errors.

While porting apps from Flex 3 to 4, you can either stick to the 2006 namespace or define additional namespace  as xmlns:mx=”http://ns.adobe.com/mxml/2009”.

Your third choice is not using mx: prefix with legacy Flex 3 components. You can read more about namespaces in MXML 2009 specification at this URL.

Yakov