hitTest page 2

31 posts

Flag Post

What I mean by lag is my hand speed. Laziness FTW :P (I hate onClipEvent(); for various reasons…)

 
Flag Post

What I mean by lag is my hand speed. Laziness FTW :P (I hate onClipEvent(); for various reasons…)


Uh huh XD

In any case, your typing skill does not define the ‘lagginess’ of a programming language :P

 
Flag Post

In any case, your typing skill does not define the ‘lagginess’ of a programming language :P

OMG MAH HAND IS LAGGING NOW :P

Anyway, do what arcaneCoder says. It’s actually better because you don’t have to click the Movie Clip/Button and you still can edit the AS, even if you lock it.

 
Flag Post

Other methods include creating bitmaps of the two movieclips, silhouetting them into a colour (say, red) and then overlaying them using a blend mode like multiply and then checking to see if the bitmap has any of the colour that should be generated when the colour is multiplied (ie red * red). There is a good function that uses this available on the internet.

It actually seems that if you are using Flash 8, there is a built-in BitmapData method that does exact hitTests using opacity. Senocular over at Kirupa has an example file, and it seems to work very well: http://www.kirupa.com/forum/showpost.php?p=1740099&postcount=8

 
Flag Post

@Faceless: That seems to do the job too, but the code in the post (no idea about the one attached, wasn’t able to download it without an account) only worked with top-left registered MCs, and would need a little tweaking to get it to work with centrally registered/otherwise

 
Flag Post

Yes, you can do bitmap pixel collision testing, but it is often more expensive than other methods. Pixel-pixel collision checking should only come when fine detail is needed and only after generic collision checking methods have determined that a collision is likely.