What does the UIComponent add to the DisplayObject?

I am trying to understand the interaction between Flex UIComponents and (Flash?) DisplayObjects ... But it is not clear to me what the UIComponent class adds to the DisplayObject. So what can a UIComponent do that DisplayObject cannot?

0


a source to share


2 answers


There are many differences, and I would definitely go to the doc for more details, but here are some of them:
Extended event model (when alpha, visibility, width, height, scale, scale, x or y change, an event is dispatched, there is also preinitialize , initialize,)
Additional properties (you can get mouseX and Y relative to children, you have access to an array of tweening properties, there is cursorManager, systemManager and focusManager that work with more Flex framework, etc. There is also a general (uncast) link to parent and app means easier root access).
CSS Support
More Techniques ... there are many.

FYI:



FlexSprite's only real difference is that it overwrites toString () to provide more details about where the object is in the hierarchy.

I would say the best way to generalize is that the Flex UIComponent is simply more robust and significantly stronger than the DisplayObjectContainer.

+2


a source


If you look at the documentation, you can see that the UIComponent adds most of the UI functionality. DisplayObject does not respond to any UI events. CSS styling functionality is also included in UIComponents.



UIComponent -> FlexSprite -> Sprite -> DisplayObjectContainer -> InteractiveObject -> DisplayObject. Each layer adds methods and events to the DisplayObject.

+1


a source







All Articles