Trigmetry and breakout

alright i want to make my breakout game better because i have it so when you hit a certain spot it goes to a set direction,i want it so if it comes in from the right and hits the wall it will go the opposite direction and vise veras if you know what i mean,

someone said that i could do this with trigonometry, but i really dont know how to do this with flash could someone please help me

please like a tutorial or something