maybe something along the lines of...
Type balloon Global BalloonList:TList = New TList Global BalloonCount:Int = 0 Const MaxBalloons:Int = 20 Field xloc:Int Field YLoc:Int Field Speed:Int Field BFrame:Int Field Direction:Int Method Kill() BalloonList.Remove(Self) End Method Function CreateBalloon:Int(count:Int) ' trim count to fit... If BalloonCount + count > MaxBalloons Then count = MaxBalloons - BalloonCount ' add balloons For Local xiter:Int = 0 To count Local b:balloon = New balloon b.XLoc = GraphicsWidth()/2 b.YLoc = GraphicsHeight()/2 b.Speed = Rand(3,10) b.BFrame = Rand(0,4) b.Direction = Rand(0,359) ListAddLast BalloonList, b BalloonCount :+ 1 Next Return BalloonCount End Function Method UpdateBalloon() DrawImage AllBalloons,xloc,yloc,BFrame xloc:+ Cos(Direction) * Speed yloc:+ Sin(Direction) * Speed If xloc > 1050 Or xloc < -50 Kill End If If yloc > 790 Or yloc < - 50 Kill EndIf End Method Function UpdateBalloons() For Local b:balloon = EachIn BalloonList b.updateBalloon() Next End Function End Type