flowerspring

// 무비클립을 (targetx, targety)로 회전시키는 함수

MovieClip.prototype.rotateTo = function(targetx, targety){

    var diffX = targetx - this._x;

    var diffY = targety - this._y;

    this._rotation = Math.atan2(diffY, diffX)*180/Math.PI;

};


_root.무비클립인스턴스.rotateTo(this._xmouse, this._ymouse);



[출처] http://blog.naver.com/sync6324/110033835026

Comment +0