2个回答
展开全部
将你第一层的动作换成下面的:
mc.stop();
mc.onMouseDown = function() {
isdrag = 1;
curX = _root._xmouse;
};
mc.onMouseUp = function() {
isdrag = 0;
};
mc.onMouseMove = function() {
if (isdrag == 1) {
xx = _root._xmouse;
if ((xx-curX)>3) {
this.gotoAndStop(this._currentframe+1);
if (this._currentframe == this._totalframes) {
this.gotoAndStop(1);
}
}
if ((curX-xx)>3) {
this.gotoAndStop(this._currentframe-1);
if (this._currentframe == 1) {
this.gotoAndStop(this._totalframes);
}
}
curX = xx;
}
};
mc.stop();
mc.onMouseDown = function() {
isdrag = 1;
curX = _root._xmouse;
};
mc.onMouseUp = function() {
isdrag = 0;
};
mc.onMouseMove = function() {
if (isdrag == 1) {
xx = _root._xmouse;
if ((xx-curX)>3) {
this.gotoAndStop(this._currentframe+1);
if (this._currentframe == this._totalframes) {
this.gotoAndStop(1);
}
}
if ((curX-xx)>3) {
this.gotoAndStop(this._currentframe-1);
if (this._currentframe == 1) {
this.gotoAndStop(this._totalframes);
}
}
curX = xx;
}
};
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询