What's the difference between the mx/fx/s object types in Flex 4?

岁酱吖の 提交于 2019-12-06 03:44:13

Namespaces allow you to specify to the compiler where to look for the files/classes that you reference in your mxml.

There are two different types of namespaces that get used in Flex 4. A language namespace and a component namespace. the http: //ns.adobe.com/mxml/2009 namespace specifies what version of the mxml language gets used. This includes things like the script tag and binding tag as well as new tags like declarations and private.

The other 2 namespaces you reference above are component namespaces. These are references to the specific ActionScript classes that make up the UI components you will use in your application. The /flex/spark component set is the new flex 4 components which have skins and component implementation seperate. The /flex/halo set are the components that exist in the flex 3 set. Be careful though the /flex/halo has been renamed /flex/mx in new nightly builds.

In Flex 3 there was only one language available and only one component set so they jammed the definitions for those together in one file. So while the technical bits under the hood have not changed, the way adobe exposes them (through multiple namespaces) has. This may seem more complicated at first, but keep in mind that in doing flex work you have always created xml namespaces for all your view components in mxml. So now you play on the same level as the core framework, which is great. Also in Flex 4 there are several languages and component sets that can be used, so it would be impossible to create that one-to-one mapping that existed in Flex 3.

For more information on this topic please refer to the Adobe docs on the subject: http://opensource.adobe.com/wiki/display/flexsdk/MXML+2009

HTH,

sim

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!