Should view be inherited from Sprite?

naghekyan's Avatar

naghekyan

17 Nov, 2013 06:54 PM

Can I aggregate Sprite and make my RL View or the truth is htat RL Views should extend Sprite or MovieClip?

  1. Support Staff 1 Posted by Ondina D.F. on 19 Nov, 2013 09:08 AM

    Ondina D.F.'s Avatar

    Can I aggregate Sprite and make my RL View or the truth is htat RL Views should extend Sprite or MovieClip?

    Can you be more specific? How are you intending to use the aggregated component?

    If you want the framework to be aware of components landing on the stage, the components have to be subclasses of a DisplayObjectContainer(->InteractiveObject->DisplayObject). A Sprite is a subclass of DisplayObjectContainer, as you well know:)

    Look at the ViewManager&Co. "The ViewManager listens for views landing on the stage, and being removed from stage, and informs interested parties, such as the mediatorMap, accordingly. "

    The mediatorMap is able to mediate non-view objects:

    https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...

    or if you use the viewProcessorMap:
    https://github.com/robotlegs/robotlegs-framework/tree/master/src/ro...

  2. Ondina D.F. closed this discussion on 23 Dec, 2013 09:26 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac