A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Please help...with Snapping objects

  1. #1
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    I'm making a puzzle & need to have the pieces snap together...I know how to make them draggable, I just don't know how to make them sbap into place...My Flash MX book is no help...please help!!!!

  2. #2
    Senior Member
    Join Date
    May 2002
    Posts
    248
    Using hitTest() you can detect if one object (or movieClip) is touching another, and if so, you can just tell it to go to a specific _x and _y which will look like it's snapping.

    Lemme know if it works,
    -Dan

  3. #3
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    what is the code for telling it to go to the exact x & y coords?


    thanks

  4. #4
    Senior Member
    Join Date
    May 2002
    Posts
    248
    You just use dot notation. Like if your clip's instance name is "thing" you say<pre>thing._x = 50;</pre>
    -Dan

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