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
try .numChildren property
On Wed, Nov 18, 2009 at 4:48 PM, Alan Neilsen aneil...@gotafe.vic.edu.auwrote:
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 I understand properly what you mean, the contains method is what you're
looking for.
if (loader_clip.contains(ldr)){
loader_clip.removeChild(ldr);
}
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html#contains%28%29
On Wed, Nov 18, 2009
3 matches
Mail list logo