this my Flock code, why removeBoid not function
public function Flock(){ ArrayList = new Array();// Initialize the arraylist } public function frun():void { for (var i:int = 0; i < ArrayList.length; i++){ ArrayList[i].brun(ArrayList);// Passing the entire list of boids to each boid individually}} public function addBoid(b:Boid):void{ ArrayList.push(b); addChild(b); } public function grun():void{ for (var i:int = 0; i < ArrayList.length; i--){ ArrayList[i].brun(ArrayList);// Passing the entire list of boids to each boid individually }} public function removeBoid(b:Boid):void{ ArrayList.push(b); removeChild(b);}} }
i am new in flash as3 in Air for Android :)