Collision & Elastic in one ball

HI!!
Guys iam new to this Forum.

I hope u guys will help me in Action Script as iam new to ACTION SCRIPT TOOO…
:beard:

So my problem…

I made few buttons … i gave them elastic property…now i want them to have a collision property also.
Its like this

If i pulll a button it behaves in an elastic manner…but if in between it hits another button it should have a collsion with it…

SO would u guys be kind enogh to explain me how to go through…or HELP ME IN THIS CODE…

iam attaching the file<:}

The proper way of doing this, I’m working on… but it’s taking some time. (ie see thread on math ratio’s with +/- in the actionscript forum)

The only thing that I can suggest is a hitTest, at the moment. However… a hitTest is not going to produce a good enough colision test for you.
A) If the velocity of the ball is too great, the hitTest will not register.
B) the angle will not refract correctly depending upon where it hits the other ball… which leads into C)
C) the kentic transfer of energy upon impact will not be correct.

So my best suggestion for now is to give me a couple of days. I’m working on a pretty good colision detection script now.

THANKX …
It was really KInd of u ???
cos i was waiting for months …and no one replyed on this topic…

THANKX a LOT

much respect if you can make a collision detection that consistently works. i’d love to see it as i have been perplexed by how flash works things out slower than it shows them!

the only way i can think of making it work, is to say that there is an area of the movie that the object cannot move to, rather than having something block its path. i dont know whether flash would process this the same way as collision detection though. it probably would.

i know that frame rate has nothing to do with things. something moving too fast will simply move through the object the same at 1 fps as it would at 50.

i think it must be a fault with hitTest so you’d have to bypass it somehow.

anyway, can’t wait to see what you come up with as this problem has dogged me for about a year and i just keep coming back for more, erm, dogging.

cheers.