In a lot of Flash libraries, you have roughly this concept: In Flex 3 terms, you start off with a Canvas, which can have children added to it. Each child is pretty much a graphic, and the Canvas is pretty much your background. But each child can also have its own children, and each of those children can have their own children. This is really convenient, because you can, for instance, create a Canvas with a whole bunch of buttons and labels on it, and then you can add the whole thing to another Canvas, only using a single function call. Afterwards the inner Canvas can change its graphics internally, without ever bothering the outer one or violating basic OOP.
I’m new to FlashPunk, and this is most likely just something I haven’t run across yet, but in Flashpunk, all I’ve found so far is that there’s the equivalent of a Canvas at the top - this is the World that FP.world is set to - and then you just keep adding children directly to that. But I haven’t seen mention so far of any way to add children (Entities and Graphics) to other children, nor have I seen mention of adding Worlds to other Worlds or anything like that.
How do you go about this in FlashPunk? Thanks!