# Testing an array of objects against each other

**URL:** <https://forum.kirupa.com/t/testing-an-array-of-objects-against-each-other/318574>\
**Category:** flash\
**Created:** [January 24, 2011, 2:05pm UTC](https://forum.kirupa.com/t/testing-an-array-of-objects-against-each-other/318574 "2011-01-24T14:05:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cermunnos](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@cermunnos](https://forum.kirupa.com/u/cermunnos)\
**Post date:** [January 24, 2011, 2:05pm UTC](https://forum.kirupa.com/t/testing-an-array-of-objects-against-each-other/318574/1 "2011-01-24T14:05:49Z")

</div>

Hi,

I have a new flash with several objects(classes) created in as3.

They are called Ball1,Ball2,Ball3 and are of type Ball:deathstar:.

I wish to be able to insert them into an array and have the array loop test them all against each other like eg. array\*.interact(array[i+1]) and so forth

Additional things I’ld like are:

[LIST]  
[_]Making sure an object isnt tested against itself,  
[_]removing objects from an array.  
[_]sorting the array(if neccessary).  
[_]adding new objects to the array  
[/LIST]

Was wondering if anybody had any experience with this sort of thing you could point me in the right direction.
