try .numChildren property
On Wed, Nov 18, 2009 at 4:48 PM, Alan Neilsen <[email protected]>wrote:
> I am using loader_clip.removeChild(ldr); to remove child objects from my
> loader clip, and I want to test if a child object is there before removing
> it. I thought it would be something like
> if (loader_clip.child !=0) { // or !="", or !=null, or ==true, or
> something like that
> loader_clip.removeChild(ldr);
> }
>
> But when I trace (loader_clip.child) it comes back "undefined" whether the
> child is still there or not.
>
> What can I use to test this so loader_clip.removeChild(ldr); doesn't
> produce an error if the child has already been removed?
> Alan Neilsen
>
>
> This message is for the named person’s use only. It may contain
> confidential, proprietary or legally privileged information. No
> confidentiality or privilege is waived or; lost by any mistransmission. If
> you receive this message in error, please immediately delete it and all
> copies of it from your system, destroy any hard copies of it and notify
> the sender. You must not directly or indirectly, use, disclose,
> distribute, print or copy any part of this message if you are not the
> intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and
> any of its subsidiaries each reserve the right to monitor all e-mail
> communications through its networks. Any views expressed in this
> message are those of the individual sender, except where the
> message states otherwise and the sender is authorised to state them
> to be the views of any such entity.
>
>
> #####################################################################################
> This e-mail message has been scanned for Viruses and Content and cleared
> by MailMarshal
>
> #####################################################################################
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders