# Velocity of multiple child's

**URL:** <https://forum.kirupa.com/t/velocity-of-multiple-childs/308719>\
**Category:** flash\
**Created:** [April 28, 2010, 8:30pm UTC](https://forum.kirupa.com/t/velocity-of-multiple-childs/308719 "2010-04-28T20:30:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JWH89](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@JWH89](https://forum.kirupa.com/u/JWH89)\
**Post date:** [April 28, 2010, 8:30pm UTC](https://forum.kirupa.com/t/velocity-of-multiple-childs/308719/1 "2010-04-28T20:30:13Z")

</div>

Hi, pretty new to flash and AS3 and I’m having some problems when adding multiple instances of a movie clip then controlling their movement. I had it working fine when I was only adding one child.

With the code I currently have 20 versions of the movieclip are added to the screen but don’t more. I just want them to float up and once out of screen new ones added.

```auto
private function addBubbles():void {

			var list:Array=[];
			for (var i:int=0; i<20; i++) {
				var newBubble:bubbleMC = new bubbleMC();
				addChild(newBubble);
				list.push(newBubble);
				newBubble.x=Math.random()*stage.stageWidth;
				newBubble.y=Math.random()*stage.stageHeight;
				
				addEventListener(Event.ENTER_FRAME, onEnterFrame);
			}

		}
		private function onEnterFrame(event:Event):void {
			newBubble.y += vy;
		}

```

Anyone know what is going wrong?

Thanks
