Question

Is is possible for two stage objects to contain the same child element?

I am basically looking to create two stages with differing scale factors, each containing all of the same child elements and essentially "mirroring" each other at different scales. Whenever I add a child element to the second stage, it seems to be removed from the first automatically. Is there an option I'm not aware of to allow multiple stages to share and render the same child objects?

Était-ce utile?

La solution

They can't contain the same children, as you've seen by adding children from one stage to the other.

You may want to clone the main stage and recreate it within the second, or at least the children of the stage.

child = stage.getChildAt(i).clone(true);

See this simple example: http://jsfiddle.net/jAUEv/1/

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top