Can’t seem to find out too much about this. I want to drag a movieclip but with ease. Superhere had a great one on his site, but it’s down. Anyone know of a good source for this?
I can’t belive I couldn’t find this in the forums
thanks
Can’t seem to find out too much about this. I want to drag a movieclip but with ease. Superhere had a great one on his site, but it’s down. Anyone know of a good source for this?
I can’t belive I couldn’t find this in the forums
thanks
did you find anything on easing? Its the same thing only the destination of the ease is the mouse position.
easydrugged.easeSpeed = 2;
easydrugged.onEnterFrame = function(){
this._x += (this._parent._xmouse-this._x)/this.easeSpeed;
this._y += (this._parent._ymouse-this._y)/this.easeSpeed;
}
MovieClip.prototype.easeDrag = function() {
this.onEnterFrame = function() {
this._x = _root._xmouse-(_root._xmouse-this._x)/1.2;
this._y = _root._ymouse-(_root._ymouse-this._y)/1.2;
this._x>_root._xmouse-1 && this._x<_root._xmouse+1 ? delete this.onEnterFrame : null;
};
this.onRelease = this.onReleaseOutside=function () {
var last = {x:_root._xmouse, y:_root._ymouse};
this.onEnterFrame = function() {
this._x = last.x-(last.x-this._x)/1.2;
this._y = last.y-(last.y-this._y)/1.2;
this._x>last.x-1 && this._x<last.x+1 ? delete this.onEnterFrame : null;
};
};
};
dr.onPress = function() {
this.easeDrag();
};
woah thanks guys!
:: Copyright KIRUPA 2024 //--