1 Reply Latest reply on Nov 7, 2010 10:06 PM by Shongrunden

    How to remove dynamically generated elements on a click event?

    ravibhushan7

      I am trying to remove  dynamically added elements from my border container. I have tried with the getChildIndex method, but it was not able to get through. Following is the syntax i am trying to use.

       

      a=int(bc.getChildIndex(DisplayObject(event.target)));

        bc.removeElementAt(a);

       

      bc is my border container index.

       

      Please suggest me a way to do this.

       

      Thanks

      Ravi