2 Replies Latest reply on Nov 12, 2008 2:43 AM by

    how to remove sprite component from its container ?

      Hi,
      In my application i have different sprite component added to a UIcomponent. Now I need that if a sprite component is selected then i should be able to delete it.
      I have added mouse click event to sprite component to recognize click on it. But when i am using uiComp.removeChild(event.target) or uiComp.removeChild(event.currentTarget) , on application run when i click on a particular sprite component it calls the handler but gives error as can not remove null child.
      How to overcome this problem, if any one have suggestion please reply.

      Thank you