Показать сообщение отдельно
Старый 22.03.2010, 15:25
Oleksiy вне форума Посмотреть профиль Отправить личное сообщение для Oleksiy Найти все сообщения от Oleksiy
  № 2  
Ответить с цитированием
Oleksiy

Регистрация: Dec 2008
Сообщений: 15
Пришел к такому решению. Может и не рационально, но хоть так.
Код AS1/AS2:
var varStopFlag:Boolean = false;
var varReversFlag:Boolean = false;
function pageTurn(){
br.line.onMouseMove = function() {
		br.line._x = br._xmouse;
		if (line._x>600) {
			line._x = 600;
		} else if (line._x<0) {
			br.line._x = 1;
		}
	};
}
br.line.onPress = pageTurn;
br.line.onRelease = pageRelease;
br.line.onReleaseOutside = pageRelease;
br.playw.onRelease = function(){
	play();
	varStopFlag=false;
	}
br.stopw.onRelease = function(){
	varStopFlag=true;
	stop();
	}
function pageRelease():Void {
	tf=Math.round((_root._totalframes*br.line._x)/600);
	if(varStopFlag)
		gotoAndStop(tf);
	else
		gotoAndPlay(tf);
	trace(tf);
	delete br.line.onMouseMove;
}
cf=_root._currentframe;
onEnterFrame=function(){
	if(Math.abs(_root._currentframe-cf)>50){
		cf=_root._currentframe;
		br.line._x=(_root._currentframe*600)/_root._totalframes;
	}
}
где playw -кнопка плэй
stopw - кнопка stop
line - некоторый ползунок