# Help with an array issue

**URL:** <https://forum.kirupa.com/t/help-with-an-array-issue/163647>\
**Category:** Uncategorized\
**Created:** [September 24, 2005, 12:04pm UTC](https://forum.kirupa.com/t/help-with-an-array-issue/163647 "2005-09-24T12:04:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fathed](https://avatars.discourse-cdn.com/v4/letter/f/b5ac83/32.png) [@fathed](https://forum.kirupa.com/u/fathed)\
**Post date:** [September 24, 2005, 12:04pm UTC](https://forum.kirupa.com/t/help-with-an-array-issue/163647/1 "2005-09-24T12:04:10Z")

</div>

I am pretty new at arrays so I really need alittle help.

I want to dynamically load an certain number of mc’s into an array and then be able to remove the mc’s one by one. It’s for a multi-power-up game.

I tried a few different things and so now I am just stuck. I can get the mc’s to load into the array with no problem, I can get the array to trace the splice (ex: 1,1,1,1 - 1,1,1 - 1,1- 1) I just cant seem t get the mc to leave the array. I want it to show,say, 3 movieClips then I press the \*[color=Red]A[/color] \*key and it shows 2 movieClips.

Here is my code:

```php

onClipEvent (enterFrame) {
	if (this, hitTest(_root.me)) {
		var bombBox:Array = [];
		var bombLeft:Number = 4;
		var xPos = 60;
		var yPos = 30;
		for (i=0; i<bombLeft; i++) {
			bombBox* = 1;
			_root.attachMovie("mc", "bomb"+i, i, {_x:xPos, _y:yPos});
			xPos += _root["bomb"+i]._width+5;
			_x = -20;
		}
	}
}
onClipEvent (enterFrame) {
	if (Key.isDown(65) and bombBox>=0) {
		bombBox.splice(0, 1);
		trace(bombBox);
	}
}

```

Any help would be great. Thanx!!
