A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: a real hitTest ?

  1. #1
    Senior Front End Developper
    Join Date
    Dec 2000
    Location
    Montréal
    Posts
    568
    I need real hitTest function that would use the real shape and the the bounding of the mc.

    Anyone know how to create a real hitTest function ?

    I create a little swf showing what I DON'T what it to do. The black box around the purple box is the bounding box. I want the ball to hit the purple box not the bounding box.

    [swf width="200" height="200" background="#FFFFFF"]http://www.geocities.com/charlesfk/hittest.swf[/swf]




    http://www.geocities.com/charlesfk/hittest.swf
    You need Flash Player 6 to view this

  2. #2
    Senior Member ironmallet's Avatar
    Join Date
    Feb 2001
    Posts
    252
    check out the tutorials at

    http://www.bit-101.com

    he's got some insights....

    also familiarize yourself with his favorites, hidden behind his calendar....



  3. #3
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    mymc.hitTest( x, y, True );

    mymc would be your purple box.
    x and y would be coordinates of the ball.

    Actually, this is for the center of your ball, if you want to detect against the balls edge, you need to add/reduce its radius to the x/y of its center.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center