Bouncing balls

how can i make the ball bounce indepently in any direction then on hitting another object in tht movie it should change it course accordingly.i have done it with two blocks placed either sides but the ball keeps moving in a staight line .
Suppose if i place blocks on all the sides how can i make it move in all the directions instead of just one.

here you go, from action scrips… http://www.actionscript.org/tutorials/advanced/circle_collisions/index.shtml good luck hope this is what u ment.

thanks for the code this is the action i required but there r few things i couldn’t undestand, if u could help.
The walls around r giving hitTest but they r not moviclips in the original .fla i have downloaded. Although the movie is running fine.So How is it possible?
Please if u can explain the AS added to the circle it will be a great help.
Thanks

this is the wonders of actionscripting, in the code you will c a bunch of _y _ x characters this is telling flash where and why the balls with bouce accordingly, the .random code tells the ball to go wherever it wants on the stage, there are sin. cos. and ten. that also can tell your objects different ways to move, I.E. the falling snow tutorial, if you edit the .random the snow wont flow as it does it will fall straight or to the left/right, hope this helps but i have to run, Bye

*tan

Thanks for ur effort but why aren’t the walls movie clips unless they are MC’s how can the hitTest be true.
Please explain.