getBounds() really confusing

Hey, I’ve tried looking through the flash help, through several books, tutorials, and posts but I still don’t understand how I use getBounds. It’s really frustrating. I need to use it to detect collision on all four sides of a wall and based upon where my movie clip (_root.char) hits it, and have it stop moving in that direction.

Please help explain this simply…thanks in advance.

Search the forum first before posting.

I did search through the forum, and lots of other places too. It still doesn’t work. I’ve never had this much trouble with a function the entire time I have used flash.

This is what I have tried to do, and apparently is correct (although it still doesnt work.)

CLIP A:


    _root.mainBounds = this.getBounds(_root);
    _root.mainBoundsXMAX = _root.mainBounds.xMax;
    _root.mainBoundsXMIN = _root.mainBounds.xMin;
    _root.mainBoundsYMAX = _root.mainBounds.yMax;
    _root.mainBoundsYMIN = _root.mainBounds.yMin;

CLIP B :


onClipEvent (enterFrame) {
    wallBounds = this.getBounds(_root);
    this.wallBoundsXMAX = this.wallBounds.xMax;
    this.wallBoundsXMIN = this.wallBounds.xMin;
    this.wallBoundsYMAX = this.wallBounds.yMax;
    this.wallBoundsYMIN = this.wallBounds.yMin;
    if (this.wallBoundsXMAX.hitTest(_root.mainBounds.XMIN)) {
        trace("Clip A's right side has made contact with Clip B's left.");
    }
}

Please help!!!

that usage is wrong, check this one:
http://www.n99creations.com/?pID=archives&col=Blue&arch=getBounds_as_walls