# AS3 Array element remove issue:

**URL:** <https://forum.kirupa.com/t/as3-array-element-remove-issue/283223>\
**Category:** flash\
**Created:** [March 3, 2009, 9:16pm UTC](https://forum.kirupa.com/t/as3-array-element-remove-issue/283223 "2009-03-03T21:16:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![geck0](https://avatars.discourse-cdn.com/v4/letter/g/f05b48/32.png) [@geck0](https://forum.kirupa.com/u/geck0)\
**Post date:** [March 3, 2009, 9:16pm UTC](https://forum.kirupa.com/t/as3-array-element-remove-issue/283223/1 "2009-03-03T21:16:57Z")

</div>

i have items drawn my stage dynamically and information regarding them in arrays.

when i remove an item from the display list:

```auto
a.target.graphics.clear();

```

```
i then use the ‘splice’ and index of method to locate chosen MC remove their values from specific array :

```

```auto
mcName.splice(mcName.indexOf(+mcRef.boxCount),1);

```

```
Now when i remove any item which isnt the lastitem of the array, then trace all the data of the array using a loop the values appear to have corrupt? like they have lost the order in the array since one was removed?

also if i trace mcName[0]; it appears to still have data even though i have spliced it?

```

any help much appreciated 🙂
