Does anyone know how to use hitTest with two movieclips so that it would detect
the collision of the visible part of the MC, not the **** bounding box??? :sigh:
Well… I have a method of doing it… It might be a little lengthy and might defeat the purpose… But…
Create small MovieClips that are alpha 0% inside of the main movie clip that you are trying to check out… Name each of these clips 1,2,3,4,5… Just put enough to make that normal bounding box seem alot smaller. Then just do a hittest with a for statement :
for(i=1;i<=10;i++)
{
if(_root.object1*.hitTest(_root.object2))
{
do something special here;
}
}
This works fine if you only have one object that you wanna do this for… If you have two though… You’ve gotta use 2-dimensional arrays… And for this… That can be a pain…
for(ii=1;ii<=10;ii++)
{
for(i=1;i<=10;i++)
{
if(_root.object[ii].hitTest(_root.object2*))
{
do something here;
}
}
}
That’s a way… But it’s by far probably not the fastest way… But it might be the way you have to do it… Not sure man…
Good Luck
<:} Marz <:}
Thanks for posting playamarz… Even though I don’t think that this fits my needs… :-\ I’ll explain why.
I’m using hitTest in a game where you control a ball that has physics and I needed the bounding boxes out of the levels objects which the ball collides to so that I could do more dynamic levels.