A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Drag only in horizontal direction

  1. #1
    Junior Member
    Join Date
    Oct 2008
    Posts
    14

    Drag only in horizontal direction

    Hi everyone,

    I have had the following problem for a while and i cant find any solution on google.

    I have the following and what i want to do is only allow the object current_switch_selector to be dragged in a horizontal direction but when i use the following for example it doesnt work

    var bounds_rect:Rectangle = new Rectangle(0, 0, 17, 10);
    trace(bounds_rect);
    current_switch_selector.startDrag(bounds_rect);

    Also the mouse doesnt stay over the object


    Anyone have any ideas on how to accomplish this?

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    var bounds_rect:Rectangle = new Rectangle(0, 0, 17, 0);
    current_switch_selector.startDrag(true, bounds_rect);

  3. #3
    Junior Member
    Join Date
    Oct 2008
    Posts
    14

    hey

    Thank you ver much mate

Tags for this Thread

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