A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Draggable mc

  1. #1
    Junior Member
    Join Date
    Nov 2003
    Posts
    18

    Draggable mc

    Hi, i have a function which allows me to drag my mc's on the x axis, but i now want them to be draggable on the y axis too.... so they can be put anywhere. My code for the x axis is below, any thoughts as to how i can make it completely draggable, not just on the x axis?

    I'm fairly new to flash, thanks for your help.



    onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse, _root._ymouse, false) && _root.blocksDrag == false) {
    this.startDrag(false, -800-this._width, this._y, 800, this._y);
    }
    }
    onClipEvent (mouseUp) {
    this.stopDrag();
    }

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    code:
    onClipEvent(mouseDown){
    if(this.hitTest(_root._xmouse,_root._ymouse)){
    this.startDrag(false);
    }
    }
    onClipEvent(mouseUp){
    stopDrag();
    }


  3. #3
    Junior Member
    Join Date
    Nov 2003
    Posts
    18
    amazing thanku so much!

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