# How can I populate more objects and move them

**URL:** <https://forum.kirupa.com/t/how-can-i-populate-more-objects-and-move-them/302596>\
**Category:** flash\
**Created:** [January 4, 2010, 3:36am UTC](https://forum.kirupa.com/t/how-can-i-populate-more-objects-and-move-them/302596 "2010-01-04T03:36:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fs\_tigre](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@fs\_tigre](https://forum.kirupa.com/u/fs_tigre)\
**Post date:** [January 4, 2010, 3:36am UTC](https://forum.kirupa.com/t/how-can-i-populate-more-objects-and-move-them/302596/1 "2010-01-04T03:36:02Z")

</div>

Hi,

I’m trying to understand Array and For Loops and they started to make sense. I have this code that generates 100 drops and moves them down but I would like to populate more and more move them down and delete them after crossing the stage (Y direction)…

Can someone please show me how to do this?

This is for learning purposes only.

Thanks

[AS]var rainDropArray = new Array();

for(var i:int=0; i\<100; i++) {  
var rainDrop:RainDrop = new RainDrop();  
rainDrop.x = Math.random() \* 550;  
rainDrop.y = Math.random() \* 550;  
addChild(rainDrop);  
rainDropArray.push(rainDrop);  
}

this.addEventListener(Event.ENTER\_FRAME, moveDrops);

function moveDrops(e:Event):void  
{  
for(var i:int=0; i\<100; i++) {  
rainDropArray\*.y += 1;  
}  
}[/AS]
