oh very sorry, my misunderstanding.
:)

jonathan howe wrote:
I don't think this is really Glen's problem. You should not have to
addChild() an object placed on the stage via the authoring environment.

On Tue, Nov 4, 2008 at 6:27 PM, sebastian <[EMAIL PROTECTED]> wrote:

If you don't do addChild() it won't actually be on the stage - even if you
add it to an array or a variable inside of the clip.

Consider:

public class Tree blabla ()
{
 private var apple:Apple;//where 'Apple' is some item you want to attach
 to this class

 public function Tree ()
 {
 apple = new Apple();
 addChild(apple);
 }

}

If I don't do an 'addChild' the Apple class will simply be assigned to the
variable apple but it will NOT be opn the stage until I add it via
addChild();

Make sense?

Google it otherwise, it's a basic AS3 concept that differs from AS2.

:)

Seb.


Glen Pike wrote:

Hi,

  If I create my AppScreens dynamically and add them - the added to stage
event handler for the AppScreen sub-class is called.

  I am not calling addChild() for the components in the AppScreen
sub-class because they are placed at authortime inside the clip - I should
not have to call addChild for these surely?
    Glen

sebastian wrote:

forget to addChild()?

  The problem I have run into is that when I instanciate an AppScreen
symbol from my library - it's not on stage - and add it to the stage I
handle the ADDED_TO_STAGE event for wiring the components up.

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to