R – to Delete item at runtime

actionscript-3adobeapache-flexflex3

I have created some shapes dynamically at run time by mouse drag, Now i want to delete any selected item the white board.How can i achieve that.
Currently i am able to delete the last drawn item through "removeChild()" method, but not the previous items.
Please help.

Thanks in advance.

Best Answer

Luckily i got my answer very soon. To delete multiple items at run time i've assign the ids to them dyanimically and the done the following:

parentComponent.removeChild(parent.getChildByName("itemName"));

before trying this i was doing

parentComponent.removeChild(item);

Cheers !!!

Related Topic