test

HTML

<canvas id="canvas" width="360" height="540"></canvas>

CSS

#canvas{background:#000;}

JavaScript

var canvas = $("#canvas")[0],
        context = canvas.getContext("2d"),
        bloons = {},
        bloonIndex = 0;

    var c_wdh = 360,
        c_hgt =  540;


    function createBloon(x, y) {
      this.x = x;
      this.y = y; 
      this.vx = 1,
      this.vy = 3;
      bloonIndex++;
      bloons[bloonIndex] = this;
      this.id = bloonIndex;
    }

    createBloon.prototype.drawImage = function() {
       this.y -= this.vy;
       context.fillStyle = "#FF0000";
       context.fillRect(this.x, this.y, 50, 50);
       if(this.y <= -120){
          delete bloons[this.id];  
       }
    };

    
    var nob = 0;
    var i = 1;
    var rendorBloon = setInterval(function(){ 
        bloons[i] = new createBloon(Math.random() * c_wdh, c_hgt);
        var b = bloons[i];
        var animate = setInterval(function () {
          context.clearRect(0, 0, c_wdh, c_hgt);          
          //for (var i in bloons){
             b.drawImage();
          //}
        }, 30); 
        
        i++; 
        nob++;
        if(nob >= 10){
          clearInterval(rendorBloon);
        }    
    }, 1000);