
Код:
function mover(){
if(this.direction){
target = this._parent;
cf = target._currentframe;
target.gotoAndStop(target._currentframe + this.direction)
if( target._currentframe >= target._totalframes ){
target.gotoAndStop(target._totalframes);
this.direction = 0;
}
if( (cf + this.direction) <= 1 ){
target.gotoAndStop(1);
this.direction = 0;
}
}
}
_root.divan4ik.createEmptyMovieClip("mover", _root.divan4ik.getNextHighestDepth())
_root.divan4ik.mover.onEnterFrame = mover;
razlojit.onRelease = function(){
_root.divan4ik.mover.direction = 1;
}
slojit.onRelease = function(){
_root.divan4ik.mover.direction = -1;
}
Have fun!
