# Boxes that bounce

**URL:** <https://forum.kirupa.com/t/boxes-that-bounce/105850>\
**Category:** Uncategorized\
**Created:** [March 30, 2004, 10:02am UTC](https://forum.kirupa.com/t/boxes-that-bounce/105850 "2004-03-30T10:02:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter66](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@peter66](https://forum.kirupa.com/u/peter66)\
**Post date:** [March 30, 2004, 10:02am UTC](https://forum.kirupa.com/t/boxes-that-bounce/105850/1 "2004-03-30T10:02:37Z")

</div>

Hi, I have 3 copies of this boxMC which are intended to bounce around inside a \_root mc.

Each has a different instance name so when I do a

trace(this);

I get:

\_level0.box1  
\_level0.box2  
\_level0.box3

as each of my 3 boxes tells me what their names are.

I want to do a For statement with this kinda thing in it:

if (this == \_level0.box\*)

but it doesn’t work, hope someone knows what I mean and can help me out? I’ll attach a .fla (mx2004) to look at. Also, any tips on how to get these boxes bouncing around inside a perimeter?

Cheers  
Pete
