阅读更多
Spark and MX components
Flex defines two sets of components: Spark and MX. The Spark components are new for Flex 4 and are defined in the spark.* packages. The MX components shipped in previous releases of Flex and are defined in the mx.* packages.
The main differences between Spark and MX components are how you use CSS styles with the components and how you skin them. For the container components, there are additional differences about how the containers perform layout.
Spark and MX define some of the same components. For example, Spark defines a button control in the spark.components package, and MX defines a button control in the mx.controls package. When a component is available in both Spark and MX, Adobe recommends that you use the Spark component.
Spark and MX also define components that are unique. For example, Spark defines components to perform three dimensional effects. MX defines data visualization components, such as the DataGrid and AdvancedDataGrid controls, not included in Spark. Your applications often contains a mixture of Spark and MX components.
(Spark 和MX 组件
Flex定义了两类组件集合:Spark和MX。Spark组件是Flex4特有的,在spark.*包中被定义。MX组件是先前flex发布版本里存在的,被定义在mx.*包中。
Spark和MX主要的区别在于组件如何使用CSS风格和如何给它们设置皮肤。对于容器组件,在容器如何进行布局上还有别的不同之处。
Spark和MX定义了一些相同的组件。例如,Spark定义一个按钮控件在spark.components 包中,MX定义了一个按钮控件在mx.controls包中。当一个组件在Spark和MX都可用,Adobe推荐使用Spark组件。
Spark和MX也定义了各自独一无二的组件。例如,Spark定义组件来演示三维效果。MX定义数据可视化组件,例如DataGrid和AdvancedDateGrid控件,不包含在Spark.你的应用程序经常会混合使用Spark和MX组件。)