for (i=2;i<9;i++){
var com:c1 = new c1();
com.x = (i-1)*90;
com.y = 280;
com.name = “ac”+i;
trace(com.name)
trace(com.x);
addChild(com);
}
this is what I used to generate my objects
addEventListener(MouseEvent.CLICK, clickHandler);
this is my listener for mouseevent
function cleanup(){
for (i=1; i<8; i++) {
removeChild(this[“com”+i])
removeEventListener(MouseEvent.CLICK, clickHandler)
}
}
and this is my clean up, apprentely I can’t delete my objects and listener because they don’t exist, they are null. Has anyone run into similar problem before? All helps appreciated