开发者

I want to make my own visualization component, which should I extend? UIComponent or Sprite?

I want to make my own visualization component. But I don't know what to extend for my class. It seems that UIComponent has commitDisplay method which would be called by invalidateDisplayList, and Sprite does not have this method. Does it mean that I could extend UIComponent as the root Component and extend Sprite as children. So I could call children's painting functions (written by myself) in the UIComponent's commitDisplay function?

开发者_JAVA技巧Thanks!


You could do anything from creating your own class/package independent of the flex component architecture to extending UIComponent (or implementing IUIComponent).

If this is just an ActionScript project, your code would need to use a Sprite's graphics object and drawing api, or add children to the sprite for it to appear on screen.

If this is for a Flex application, whatever you want to render would need to be integrated in a UIComponent, and drawn in the component's updateDisplaylist method. If you just want to add children to a UIComponent, do that in the createChildren method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜