A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Can you resize the hit area of a movieclip?

  1. #1
    Senior Member
    Join Date
    Aug 2005
    Posts
    225

    Can you resize the hit area of a movieclip?

    im using hitTest. alot but the boxes around my MCs are getting just a little to big and the collisions are happening to soon. Can that box (the one that has the light blue lines that you see when you select the movieclip) be resized without actually making the symbol smaller?

  2. #2
    I tried... dbarbarian's Avatar
    Join Date
    Aug 2003
    Location
    Berkeley, California, USA
    Posts
    678
    Just put an invisible rectangle inside the MC of how big you want the hit area to be.

  3. #3
    11 Years Old Boya
    Join Date
    Apr 2004
    Posts
    61
    Use art collision. It's much better.
    Checkout my site:
    Click HERE
    Checkout my games:
    Oops! No game for now!

  4. #4
    Senior Member
    Join Date
    Aug 2005
    Posts
    225
    Quote Originally Posted by Gamerflash
    Use art collision. It's much better.
    ?

  5. #5
    Create a movieclip called mcHitArea.
    Make a layer called area, and put a rectangle in it.
    Make a layer called action, and put this code in it:

    this._visible = false;
    this._parent.hitArea = this;

    Then, create a new layer in your actual movieclip called hit area, and put mcHitArea in this layer. Resize the box to anything you want.

    Now your collision will use the new area instead.

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