
Код:
my_mc.stop();
my_mc.stayAtEnd = false;
my_mc.goForward = function(){
this.onEnterFrame = function(){
this.nextFrame();
if(this._currentframe = this._totalframes){
delete this.onEnterFrame;
if(!this.stayAtEnd) this.goBackward()
}
}
}
my_mc.goBackward = function(){
this.onEnterFrame = function(){
this.nextFrame();
if(this._currentframe = 1){
delete this.onEnterFrame;
if(this.stayAtEnd) this.goForward()
}
}
}
my_mc.onRollOver = function(){
this.stayAtEnd = true;
this.goForward();
}
my_mc.onRollOut = function(){
this.stayAtEnd = false;
this.goBackward();
}