janlay在上个帖子中说
引用:
发问前先搜索一下旧帖 :)
www.5dmedia.com/bbs/newsdetail.asp?id=376349
效果作出来了,可是还有两个问题:
1。我的MC1和MC2 播放时有时不连贯,有时却重叠在一起,如果要它连贯并且不重叠该改哪里?
2。代码不是全部都会,janlay您能大概解释一下吗?
第一个问题很重要,请一定指教一下。第二个问题没时间就算了
以下是您的AS
Stage.scaleMode = "noScale";
fscommand ("allowscale", false);
_root.onLoad = function () {
MovieWidth = 764;
ActualHeight = 79;
BlockWidth = 764;
PicSpacing = 9;
speed = (this._xmouse - MovieWidth / 2) / 20;
};
_root.onEnterFrame = function () {
if (_xmouse > 0 && _xmouse < Moviewidth && _ymouse > 0 && _ymouse < ActualHeight) {
if (speed > 0) {
speed -= 0.3;
if (speed < 0) {
speed = 0;
}
} else if (speed < 0) {
speed += 0.3;
if (speed > 0) {
speed = 0;
}
}
} else {
speed = (this._xmouse - MovieWidth / 2) / 20;
}
mc1._x += speed;
mc2._x += speed;
for (i = 1; i <= 2; i++) {
for (j = 1; j <= 9; j++) {
}
}
};
mc1.onEnterFrame = function () {
if (this._x <= BlockWidth / 2) {
mc2._x = this._x + BlockWidth + PicSpacing;
}
if (this._x >= BlockWidth / 2) {
mc2._x = this._x - BlockWidth - PicSpacing;
}
};
mc2.onEnterFrame = function () {
if (this._x <= BlockWidth / 2) {
mc1._x = this._x + BlockWidth + PicSpacing;
}
if (this._x >= BlockWidth / 2) {
mc1._x = this._x - BlockWidth - PicSpacing;
}
};