The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 4 of 4

Thread: I need some math help

  1. #1
    Borderline User

    I need some math help

    Hi All,
    let me start by saying that I am horrible at math and I am in some dire need of help. I have a bunch of objects on the stage and I'm trying to find out if the center of the smaller objects is inside a larger one. Please see attached illustration.

    the x's mark the centers of the objects. I'm trying to find which of the black objects' centers are within the larger blue object. eventually I'll need to move them to a point on the blue objects perimeter, but if I can some help with this it will be a huge step in the right direction. Please let me know if that makes sense or not.

    Much appreciation.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	diagram.jpg 
Views:	28 
Size:	10.4 KB 
ID:	50139  

  2. #2
    you don't need math, try with hitTest. you can test if an object hits some x,y coordinates or another object

  3. #3
    If you want to use math, see the attached example.
    Attached Files Attached Files

  4. #4
    Borderline User
    Quote Originally Posted by creatify View Post
    If you want to use math, see the attached example.
    fan-freaking-tastic! I started to implement my own version of this but this formula looks much better than what I had started to hack together. I'll post any other questions but I think I can get there with this FLA.

    Thanks a million creatify!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012