A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: mouse cursor, constrain to rectangle

  1. #1
    Member
    Join Date
    Jun 2001
    Posts
    71
    hello everyone,
    umm well I know how to make the cursor and all but the constrain to a rectangle thing is really confusing me.
    all it allows me to input is the L: R: T: B:
    but I'm not sure what to input,
    can anyone help me?
    how does htis work?

    thanks a lot in advnaced

  2. #2
    Senior Member
    Join Date
    May 2001
    Location
    Sweden
    Posts
    197
    It is quite simple.
    When using the startDrag() command, L, R, T and B are the edges of a rectangle. If the mouse is outside the rectangle the movieClip you're dragging will stay inside at these edges.

    So you put:
    L to the left x value of the rectangle
    R to the right x value
    T to the top y value
    and B to the bottom y value.

    The MovieClip will then be confined to that rectangle.

  3. #3
    Member
    Join Date
    Jun 2001
    Posts
    71

    Smile thanks a lot

    hello Rydeman,
    sorry I dind't reply sooner,
    but I got caught up with other thingsh ope you udnertand
    Anyways, thnaks a lot,
    I tried it today and it worked! I dind't know that the mouse isn't supposed to be retained but only the mc the mouse is dragging is retained,
    thanks for clearing it all up for me.

    so, thanks! :P

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