Показать сообщение отдельно
Старый 10.02.2007, 06:07
Llex3D вне форума Посмотреть профиль Отправить личное сообщение для Llex3D Найти все сообщения от Llex3D
  № 6  
Ответить с цитированием
Llex3D
 
Аватар для Llex3D

Регистрация: Oct 2004
Сообщений: 149
Код:
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!