Incredibly flawed
For something as simple as this, your script is far too long and unneccessary (sp?).
This could easily be written 1/2 or 1/4 of what you have there. Also, the script could easily be cleaned up by having alot of the script on the walls and using tellTarget(_root.ball){ to change the variables. also, you could of threw in some nice easy trig in there to make the angles more fluent. Also, why is it that with the Gravity modifier at 1 the ball continues to rise? You need to re-read your script and fix it... And possibly slice and dice it.