I'm basically looking for a simpler way to do it or some tricks I can use.
My first approach was to take the circles current position and then draw two lines from it's edges to where it will be in its new position. I tried to use an estimation by using one of two sets of lines:
A
__
/ \
D | | B
\__/
C
either I would make a line connecting the circles A points and another connecting their C points, or I would make a line connecting their two B points and two D points. A and C would be chosen if abs(dx) > abs(dy).
I then would then plug in the y and x values for the sides of the rectangle into those lines equations to see where they intersect, then test to make sure the intersections are within the bounds of the rectangle.
Testing those bounds depends on the side I chose, whether dx > 0, whether dy > 0 and whether abs(dx) > abs(dy), creating a decent sized headache for me.
A more accurate alternative would be to select the lines based upon the direction the circle is headed. If it were headed in the dy/dx direction then a point on the circle at dx/dy from it's center would be chosen instead of A,B,C, or D. That would have most of the same problems.
Another way is just to see if the closest part of the circles new position is inside the rectangle by making sure it's x coordinates are greater than the left side of the rectangle and less than the right side of the rectangle, then the same for the y. That creates the problem of telling which side to bounce off of and where on that side to bounce off of, which is doable, but also a headache.
Welcome to my world.
Because you're only working with circles, your problem is actually a lot simpler than the ones I was having. I think you'll find this site handy:
http://www.gamedev.net/reference/articles/article1026.asp
It didn't help me a whole lot (except dealing with wall corners), but it could be just what you need.
Lummox JR