A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: startDrag problem

  1. #1
    Senior Member
    Join Date
    Sep 2003
    Posts
    303

    startDrag problem

    Hello!

    I am using this code to make a draggable bar within a long box. It works great except when I roll out, it continues to drag back and forth, depending on where the mouse is on the rest of the screen, even though it's not over the movie clip itself.

    This is the code I used on the timeline:

    // Starts the dragging
    _root.connect.onRollover = function() {
    _root.connect.startDrag(false, 50, 148, 655, 148)
    }

    // Stops the dragging
    _root.connect.onRollout=function(){
    this.stopDrag();
    }

    OR does anyone have any other suggestions? the site I'm modeling this function after is www.andytitus.com

    Thanks!

  2. #2
    Senior Member bs_grewal's Avatar
    Join Date
    Dec 2002
    Posts
    548

    Dear Furpants

    u r using onRollOver for to start drag and onRollOut to stop drag.
    according to ur code, ur file shouldn't work (even not start drag) coz u r using onRollover instead of onRollOver and onRollout instead of onRollOut.

    when u change ur spellings ur file will work only to start drag not to stop drag.
    coz when u r draging ur object by rollingover ur mouse is always rollsover. so onRollOut wouldn't work.

    i think u shoud use either onRollOver to start drag and OnRelease to stop drag or onPress to start drag and onRelease to stop drag.

    thanks
    Thanks
    Baljit Singh Grewal
    Click here to email me
    Messengers: baljit@bsgrewal.com

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