
16.03.2006, 14:15
|
|
Регистрация: Jan 2006
Сообщений: 19
|
as
Здрасте помогите разобратса с кодом!
stop();
pred_mc = null;
now_mc = null;
for (i=1; i<=5; i++) {
this["but"+i].i = i;
this["but"+i].onRelease = function() {
_root.now_mc = this.i;
if (_root.pred_mc == null) {
_root.pred_mc = this.i;
_root["mc"+this.i].onEnterFrame = function() {
this.gotoAndStop(this._currentframe+1);
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
}
};
} else {
_root["mc"+_root.pred_mc].onEnterFrame = function() {
this.gotoAndStop(this._currentframe-1);
if (this._currentframe == 1) {
_root["mc"+_root.now_mc].onEnterFrame = function() {
this.gotoAndStop(this._currentframe+1);
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
}
};
delete this.onEnterFrame;
}
};
}
};
}
я думаю с исходником все будет понятно!
|