# getBounds doesn't works, how to?

**URL:** <https://forum.kirupa.com/t/getbounds-doesnt-works-how-to/281384>\
**Category:** flash\
**Created:** [February 8, 2009, 6:21pm UTC](https://forum.kirupa.com/t/getbounds-doesnt-works-how-to/281384 "2009-02-08T18:21:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enridp](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@enridp](https://forum.kirupa.com/u/enridp)\
**Post date:** [February 8, 2009, 6:21pm UTC](https://forum.kirupa.com/t/getbounds-doesnt-works-how-to/281384/1 "2009-02-08T18:21:55Z")

</div>

Hello !  
This is my problem, I have a MC, it contains many others MCx, and I need to test if these MCx are inside a zone, even when I rotate my MC, I’m doing this with getbounds(), and it works great but only when my MCx are in the DisplayObjectContainer list, if I remove them, then getbounds() doesn’t work, at really it shows my original bounds (not my “rotated” bounds…).  
I think this is because the MCx objects are not inheriting the rotationX property anymore (because MC.getbounds() works good even when I remove MC from the stage, I think this is because MC.rotationX is directly modified…).  
So, my question is, how can I implement my own getbounds()? I need a way to know how is made the projection in flash.  
I found this in the help (z property from DisplayObject)  
The X and Y position in the window:  
X = x_cameraFocalLength/cameraRelativeZPosition  
Y = y_cameraFocalLength/cameraRelativeZPosition

But I don’t know how to obtain these two values (cameraFocalLength and cameraRelativeZPosition)

Please I need help with this.  
THANKS !!!  
enrique.  
PS: sorry for my bad english ☹

PS2: the code looks like this:  
MC.rotationX = -30;  
MC.getBounds(this); //works great  
MC.mc1.getBounds(this); //works great

MC.removeChild(MC.mc1);  
MC.getBounds(this); //works great  
MC.mc1.getBounds(this); //doesn’t work, it shows the original ("planar, not rotated) bounds

removeChild(MC);  
MC.getBounds(this); //works, not so great, but at least the height and width are correct
