A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Drag movieclip on Y-axis

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    13

    Drag movieclip on Y-axis

    Hi,
    Is it possible to drag a movie clip named "xxxx" along the y axis when you click and drag? if so what is the as2 code?

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Actionscript Code:
    xxxx.onMouseDown = function() {
        if(this.hitTest(_root._xmouse, _root._ymouse, true)) {
            this.onMouseMove = function() {
            this._y = _root._ymouse;
            updateAfterEvent();
            }
        }
    }
    xxxx.onMouseUp = function() {
        delete this.onMouseMove;
    }

    gparis

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