AS基本语言中的问题
MovieClip.prototype.elasticMoveX=function(targetX,a,b){this.tempX=this._x;this._x=((a...
MovieClip.prototype.elasticMoveX = function(targetX, a, b) {
this.tempX = this._x;
this._x = ((a*(this._x-targetX))+(b*(this.prevX-targetX)))+targetX;
this.prevX = this.tempX;
};
_root.Select = 0;
_root.mc1X = 345;
_root.mc2X = 425;
_root.mc3X = 505;
_root.dis = 20;
_root.speed = 0.5;
this.onEnterFrame = function() {
if (_root.Select == 0) {
var i = 1;
while (i<=3) {
i++;
}
this.mc1.elasticMoveX(_root.mc1X, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X, _root.speed, -0.1);
}
if (_root.Select == 1) {
this.mc1.nextFrame();
this.mc2.prevFrame();
this.mc3.prevFrame();
this.mc1.elasticMoveX(_root.mc1X, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X+_root.dis, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X+_root.dis, _root.speed, -0.1);
}
if (_root.Select == 2) {
this.mc1.prevFrame();
this.mc2.nextFrame();
this.mc3.prevFrame();
this.mc1.elasticMoveX(_root.mc1X-_root.dis, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X+_root.dis, _root.speed, -0.1);
}
if (_root.Select == 3) {
this.mc1.prevFrame();
this.mc2.prevFrame();
this.mc3.nextFrame();
this.mc1.elasticMoveX(_root.mc1X-_root.dis, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X-_root.dis, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X, _root.speed, -0.1);
}
}; 展开
this.tempX = this._x;
this._x = ((a*(this._x-targetX))+(b*(this.prevX-targetX)))+targetX;
this.prevX = this.tempX;
};
_root.Select = 0;
_root.mc1X = 345;
_root.mc2X = 425;
_root.mc3X = 505;
_root.dis = 20;
_root.speed = 0.5;
this.onEnterFrame = function() {
if (_root.Select == 0) {
var i = 1;
while (i<=3) {
i++;
}
this.mc1.elasticMoveX(_root.mc1X, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X, _root.speed, -0.1);
}
if (_root.Select == 1) {
this.mc1.nextFrame();
this.mc2.prevFrame();
this.mc3.prevFrame();
this.mc1.elasticMoveX(_root.mc1X, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X+_root.dis, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X+_root.dis, _root.speed, -0.1);
}
if (_root.Select == 2) {
this.mc1.prevFrame();
this.mc2.nextFrame();
this.mc3.prevFrame();
this.mc1.elasticMoveX(_root.mc1X-_root.dis, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X+_root.dis, _root.speed, -0.1);
}
if (_root.Select == 3) {
this.mc1.prevFrame();
this.mc2.prevFrame();
this.mc3.nextFrame();
this.mc1.elasticMoveX(_root.mc1X-_root.dis, _root.speed, -0.1);
this.mc2.elasticMoveX(_root.mc2X-_root.dis, _root.speed, -0.1);
this.mc3.elasticMoveX(_root.mc3X, _root.speed, -0.1);
}
}; 展开
1个回答
展开全部
你这个还是AS2.0的脚本,但你并没提出啥问题,如何回答?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
富港检测技术(东莞)有限公司_
2024-05-27 广告
2024-05-27 广告
ISTA3E程序是对相同产品的集合包装的综合模拟性能测试,集合包装件被定义为将一个产品、多个产品或包装件放置在滑板或托盘上,固定在一起或是作为一个单元运输。例如:一台机器由带瓦楞底托的托盘上、瓦楞侧围、顶盖包装,用缠绕膜缠绕在托盘上。用于评...
点击进入详情页
本回答由富港检测技术(东莞)有限公司_提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询