Groups | Blog | Home
all groups > flash actionscript > february 2004 >

flash actionscript : bouncing ball


Joso
2/2/2004 6:19:32 PM
hi,

if you check out this link :

http://www.atreyuonline.com/flash/gravity.html

You will see i've got a bouncing ball and a red bar across the middle of the movie, how would i make the ball bounce off the the bar in the middle as it does when it hits the walls?

Also, is it possible that when the ball collides into the bar that you can assign a gotoAndPlay action to it?

if you click the link below you can download the .fla file so if someone could have a look into it and let me know what to do that would be awesome, im unfamiliar with the hitTest action so i don't know where to start!

http://www.atreyuonlin.com/flash/gravity.fla

thanks alot :)

iEdgar
2/2/2004 9:14:23 PM
Joso, u can use the HitTest and Hit Area commands to check the moment in which the ball touches the bar, look for these commands on the Help.



AddThis Social Bookmark Button