I 'm trying to check collision of two objects in a fash cs3 project.
It’s a Sprite called Pin (uses pin.png) and a Sprite called Balloon (uses balloon1.png).
With balloon1.png it works ok (it works always), but when I replace balloon1.png with another png (balloon2.png) it sometimes doesn’t work.
Both ballons have transparency, I don’t know if this has some impact on hittest.
I tried and with png and jpg without transparency, but the same thing happened: sometimes hittest didn’t work.
What should I check to make it always work correctly?
(the code is: if (bubble.hitTestObject(_pin))
you would have to post more code but two guesses would be they are in different coordinate spaces, or you are not calling the hittest at the right time, or only calling it once
How about you post balloon1.png and balloon2.png?
The one that works well (BubbleBitmap) is embedded in this fla:http://www.freeactionscript.com/download/as3/realistic-floating-soap-bubbles.zip
The one that doesn’t work always is: