6 Replies Latest reply on Oct 2, 2007 9:54 PM by AScracker

    Need Help in Hittest

    AScracker
      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
        • 1. Re: Need Help in Hittest
          kglad Adobe Community Professional & MVP
          what does drawing a line (presumably using the actionscript drawing api) have to do with a hitTest?
          • 2. Re: Need Help in Hittest
            AScracker Level 1
            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
            • 3. Re: Need Help in Hittest
              kglad Adobe Community Professional & MVP
              use an onDragOver handler, in addition to your hitTest to initiate your function that uses the drawing api.
              • 4. Re: Need Help in Hittest
                AScracker Level 1
                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

                • 5. Re: Need Help in Hittest
                  kglad Adobe Community Professional & MVP
                  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.
                  • 6. Re: Need Help in Hittest
                    AScracker Level 1
                    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