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;
}
};
北京伟景智能科技
2024-11-23 广告
2024-11-23 广告
针对3D视觉无序抓取,北京伟景智能科技有限公司推荐采用基于深度学习和3D相机的解决方案,如AccuPick 3D等成熟方案。这些方案能够快速辨识不同工件在三维空间的位置与姿态,并精准引导机械手臂进行取放,有效提升生产效率。同时,这些方案还具...
点击进入详情页
本回答由北京伟景智能科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询