Skip to main content
Inspiring
October 1, 2007
Question

Need Help in Hittest

  • October 1, 2007
  • 3 replies
  • 389 views
hi
i am facing problem in Hittest function i.e if the i want to drawn the line inside the square .
1) it is working fine if the i clicked inside the square
2) but if i click outside the square and drag the mouse inside the square then it 's not drawn again
i need to click inside the sqaure to drawn
is there any possible wayt to clear this issue...
~~Sk
This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
October 1, 2007
then use a mouseDown handler to initiate a loop that checks for a positive hitTest with your movieclip. terminate the loop on mouseup. make sure you don't call your drawing function twice when your movieclip is clicked.
AScrackerAuthor
Inspiring
October 3, 2007
HI,
I am facing a new Problem in my code i.e on dragout function is working fine if place the code and movie clip inh seprate fla file but in my code it consist of soo many movieclip

for eg:

_root.panels_mc.frontView.frontView_ForeLegs_R.onDragOut = function()
{
trace("Trace hi");

}
it produce the Trace function when i hitted the movieclip..... and i'm using the hittest function as seprate Function
i do't where i did my blundered mistake

can u tell me where i did my blundered mistake .it cracking my mind....

~~Sk
kglad
Community Expert
Community Expert
October 1, 2007
use an onDragOver handler, in addition to your hitTest to initiate your function that uses the drawing api.
AScrackerAuthor
Inspiring
October 1, 2007
hi
it's working fine but first if we click the "my_btn" and move the mouse it working fine
But Actaully if i click outside the movieclip "my_btn" and drag inside the mouse to the movieclip it's not working fine

kglad
Community Expert
Community Expert
October 1, 2007
what does drawing a line (presumably using the actionscript drawing api) have to do with a hitTest?
AScrackerAuthor
Inspiring
October 1, 2007
yeah using drawing api function and HitTest

1) what i have did is
if(current_mc.hitTest(_root._xmouse,_root._ymouse,true))
{
// statement it call the function to drawn using api
}
~~Sk