Skip to main content
Participant
June 18, 2008
Question

Checking to see if a movieclip has a child

  • June 18, 2008
  • 1 reply
  • 476 views
I need an if statement or the like that checks to see whether a movie clip has a child attached to it.
I'm looking to remove an image that i loaded by using removeChild, but i need a way of knowing if the image is there or not, because if it's not removeChild gives me errors.

Thanks!
This topic has been closed for replies.

1 reply

Inspiring
June 18, 2008
You have numChildren property. You can iterate trough all children, or just check if numChildren is != 0.

Best.
Known Participant
June 18, 2008
Thank you! That's perfect!