Thank you. It was my understanding that bitmapdata had to be done with bitmaps.
Printable View
Thank you. It was my understanding that bitmapdata had to be done with bitmaps.
Problem with this example. I can't reproduce it. Even if I copy over the exact code and exact object names that he uses it doesn't work. Could someone please show me what I'm doing wrong?Quote:
Originally Posted by WilloughbyJackson
May I ask how you reached this conclusion?Quote:
Originally Posted by Inglor
bitmapData works a bit different from usual hit detection.Quote:
Originally Posted by swak
The first problem is Tonypa is taking a snapshot of the entire world, starting at point (0,0) or the upper left hand corner of the screen. This was not written for object to object collision (ball vs square) but object to background (ball vs square in a movie clip which fits over the root). The squares clip should be inside of something which has a registration point at 0,0 and that is what should be copied to bitmapData.
Secondly, bitmaps hittest similarly to how they attach... They start at the upper left hand corner. Thus the circle should have the registration point in the upper left hand corner.
Finally, because you are not moving ahead 1 pixel by 1 pixel, you're going to need something to tell how far into a target the object has travelled. For that, Tonypa did another experiment with using the colorRect overlap which can tell you how far your object has overlapped the background. Is this the best solution, who knows. This is all still pretty new.
-pXw
Attached is the corrected file...
Thank you. It's a bit funky though.