Incorrect positioning system -- any ideas?

Hello all.

I have designed two classes to be used in a GUI interface, DynamicBox and DynamicPart.

DynamicBox is simply a movieclip which draws itself to a specified size and position, and then DynamicParts can be added to it which attach to it and move with it when it is resized/repositioned.

Each DynamicPart can be positioned in one of 9 starting locations, upper-left, upper, upper-right, left, middle, right, lower-left, lower, or lower-right. This position can then be modified with two offset numbers, offsetX and offsetY, which move the clip horizontally or vertically, respectively.

For the most part, these two classes work perfectly. However, all clips positioned on the right side (upper-right, right, and lower-right) or the lower side (lower-left, lower, and lower-right) are not repositioned perfectly, they’re all off of the edge by a little bit.

The classes and testing environment are attached.

Can anyone help me figure out why they don’t position perfectly?