So I am trying to create a simple animation in which a ball bounces around a circle. But my test for hitting the circle uses a^2+b^2 = c^2. Now it works to an extent. I check to see if the hypotenuse of the right triangle is > 200 (the radius of the circle) and if it is, I have the ball bounce away. The problem is that flash tries to calculate the trig and every single time its calculation completes, the ball is past the circle and thus the 200 mark. So what ends up happening is the ball bounces back, but is then caught is a web because it is sometimes still beyond 200 when the calculation is done again and therefore bounces away from the circle again.
So if this makes any sense to anyone out there, can you tell me if I am just going about this the wrong way, or does flash just not react fast enough?
Thanks,
Lucas