package kujundid{ import flash.display.Sprite; public class Pall extends Sprite{ private var hoidla:Array; public function Pall(varv:int, suurus:int, x:int, y:int, hoidla:Array){ graphics.beginFill(varv); graphics.drawCircle(0, 0, suurus); this.x=x; this.y=y; this.hoidla=hoidla; } public function liiguta():void{ y=y+1; if(y>300){ parent.removeChild(this); hoidla.splice(hoidla.indexOf(this), 1); //eemaldab } } } }