dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Smooth startDrag()

  1. #1
    dubba you tee eff steven_h_2000's Avatar
    Join Date
    Oct 2000
    Location
    Columbus, Ohio
    Posts
    137

    Smooth startDrag()

    Hey guys...made a little something you might wanna see: crreate a smooth startDrag() in flash

  2. #2
    Senior Member
    Join Date
    Nov 2004
    Posts
    928
    yes very smooth - though you might want to put some ease in when the mc locks to centre.
    alternatively a simpler approach (but i am not saying better)

    myDraggableMC.onPress = function() {
    this.startDrag();
    }
    myDraggableMC.onRelease = function() {
    this.stopDrag();
    }
    myDraggableMC.onMouseMove = function() {
    updateAfterEvent();
    }

  3. #3
    dubba you tee eff steven_h_2000's Avatar
    Join Date
    Oct 2000
    Location
    Columbus, Ohio
    Posts
    137
    sure you could do that, except you would need to place that onMouseMove = function() {
    updateAfterEvent();
    }

    onto every movieclip you want to drag smoothly

  4. #4
    Senior Member
    Join Date
    Nov 2004
    Posts
    928
    fair point - fortunately i did say that it wasn't necessarily better - just simpler

  5. #5
    dubba you tee eff steven_h_2000's Avatar
    Join Date
    Oct 2000
    Location
    Columbus, Ohio
    Posts
    137
    i ran into it because i wanted my startdrag to be smooth but i also had something else i wanted to happen during the drag, a little customization

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