The Flash (E-1/ part 1) Hindi Flash in Hindi, THE FLASH IN HINDI All rights reserved ABC,NBC,CBS,The CW.
@Saad: Almost (the usual term for main is the 'document class', BTW). We start with main >> stage as you say (taking '>>' to mean 'contained by' or 'on'). Then, if addChild(foo) is done in main, we get foo >> main >> stage. With foobar you get foobar >> foo >> main >> stage. If you want to add foobar to main instead, then you need to pass the instance to foo for it to use, yes. If you want foobar on the stage directly, you can say stage.addChild(foobar) inside foo (which avoids having to pass stage) -- but only once foo is actually on the stage itself (otherwise its stage property is null). – Mar 17 '11 at 5:19 •.