I am trying to understand the interaction between Flex UIComponents and (Flash?) DisplayObjects… But it’s not clear to me what the UIComponent class “adds” to DisplayObject. So, what can a UIComponent do that a DisplayObject cannot?
I am trying to understand the interaction between Flex UIComponents and (Flash?) DisplayObjects… But
Share
There are a lot of differences, and I would definitely go to the doc’s for more detail, but here are some:
Expanded event model (when alpha, visible, width, height, scalex, scaley, x or y are changed, an event is dispatched, there is also the preinitialize, initialize, )
Additional properties (you can get the mouseX and Y relative to the children, you have access to the tweening properties array, there is a cursorManager, systemManager and a focusManager which work with the greater Flex framework and more. There is also a generic (uncast) reference to the parent and the application meaning easier access to root).
It has CSS support
Additional Methods… there are a lot.
FYI:
FlexSprite‘s only real difference is that overwrites toString() to provide more detail about where the object is in the hierarchy.
I would say that the best way to summarize is that the Flex UIComponent is simply more robust and significantly stronger than the DisplayObjectContainer.