Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActionScript MXML <mx:> vs <s:>

Looks like I can use components for both <mx:> or <s:>.

So, which has more advantages?

like image 473
The Student Avatar asked Aug 17 '26 06:08

The Student


1 Answers

As other posters have mentioned, the spark (s:) namespace refers to the new components introduced with Flex 4, while the halo/mx (mx:) namespace refers to the older components.

They can be used together, which is necessary since there are not spark equivalents for all of the mx components (notable omissions are DataGrid, Tree, DividedBox, among others.) Some of the motivations for the new spark components include: Separation of form from function, which means the spark components are very much skin driven. Lighter weight for performance gains (You can use s:Group for laying out your components rather than mx:Canvas, which is much more efficient since s:Group doesn't have any visual characteristics like fill or border.)

Bottom line: I find the spark components to be very efficient performance-wise but a little fussy for changing appearance/behavior since you need to create custom skins for them. Also, they have a few quirks that still need to be ironed out (why don't DropDownLists automatically determine their width based on content like the mx versions did?!) Since the halo/mx components are on the path to deprecation, it's generally good practice to use the spark components whenever you can.

like image 151
Wade Mueller Avatar answered Aug 19 '26 11:08

Wade Mueller



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!