# Multiple object hitting each other-problem

**URL:** <https://forum.kirupa.com/t/multiple-object-hitting-each-other-problem/310024>\
**Category:** programming\
**Created:** [May 30, 2010, 5:35pm UTC](https://forum.kirupa.com/t/multiple-object-hitting-each-other-problem/310024 "2010-05-30T17:35:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hangyoo](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@Hangyoo](https://forum.kirupa.com/u/Hangyoo)\
**Post date:** [May 30, 2010, 5:35pm UTC](https://forum.kirupa.com/t/multiple-object-hitting-each-other-problem/310024/1 "2010-05-30T17:35:31Z")

</div>

Hi All!  
I havent wrote here for ages.Now i stucked in an issue.  
So here comes:

There are 3 box in a MovieClip. They move to separate direction when they are contacted with the mouse.Its working fine.But!  
When i want to hit each other.its not working.

i know that i should do this with for loop,i searched the net for several solvation,but couldnt find any.

when i call the 3 box they are linked with a box.as file  
so maybe here is the place where i need to write something:

for(var i:Number=0;i\<container.numChildren;i++){  
var boxes=container.getChildAt(i)  
if(hitTestObject(boxes)){  
-----------something-----------  
}

That kind of thing is not working.I read article that talked about multiple for- loops.  
So they are in the same Array.  
Anyone have any idea about this?🙂

I tried to get some info out of bounching balls simmulations,but they are a litle bit overpower for me.Cant navigate easily between the lines.

Any help would be nice!  
I just need tip or something to deal with:)

Thx
