flash - Error #2025 AS3 -
i'm trying build game chicken invaders , eror : argumenterror: error #2025: supplied displayobject must child of caller. @ flash.display::displayobjectcontainer/removechild() @ superstudent7_fla::maintimeline/movebullet() this problem occurs when space ship shoots. to solve , need know 2 things: my bullets defined movieclip s ,and not on stage.. brought them stage this: function shooting(e:event):void { var bullet:bullets = new bullets(); // bullets class name of movieclip ... ... ... addchild(bullet); bullet.addeventlistener(event.enter_frame,movebullet); }//end of shooting i need know if ok add bullet stage this? or there way? here code makes bullet move: function movebullet(e:event):void { e.target.y -=10; for(var i=0;i<enemy.numchildren;i++) { if(e.target.hittestobject(enemy.getchildat(i))) { counthits[i]=counthits[i]+1; e.target.removeeventlistener(event.enter_frame,movebullet);...