Hi,
I have 2 movie clips... A and B
In A(an instance), I put the code
//covered between onEnterFrame(and onEnterFrame covered between onClipEvent)
if(A.hitTest(B))
{
//stop A
}
The problem is A always surpasses(overlapping) B for quite a distance, then only stops.
Could someone please tell me or teach me how to make it stop exactly when A touches(get in contac witht) B.
I really appreciate any advice. Thank you very much!
regards
I'm assuming you have this under onClipEvent(enterFrame)....
This means that every time flashplayer runs through all of the frames and ends up at that frame, it checks. If you have a really long timeline, this means that it takes a bit to get there. Also, if your frame rate is slow, it takes time. Without seeing all of your code or how you are managing your timeline, it's hard to say what the problem is.
Thanks for your reply.
I am only using a single frame and the fps is 24.
In A
-----
onClipEvent(load)
{
onMouseMove = function()
{
//currently I am trying various tricks to see if any of them works
}
}
And the movement of A is controlled by mouse, if I move the mouse slowly, it works...
However, if movement too fast it just fails.
Thank you for any suggestions.
regards
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.