Показать сообщение отдельно
Старый 12.04.2008, 12:34
Wolsh вне форума Посмотреть профиль Отправить личное сообщение для Wolsh Найти все сообщения от Wolsh
  № 7  
Ответить с цитированием
Wolsh
Нуб нубам
 
Аватар для Wolsh

модератор форума
Регистрация: Jan 2006
Адрес: Бердск, НСО
Сообщений: 6,445
Это похоже?
Код:
var max:Number = monet_mc._totalframes;
//////////////////////
monet_mc.onRollOver = function(){
	//Mouse.hide();
	}
monet_mc.onPress = function(){
	start3D(this._xmouse, this._currentframe);
	}
monet_mc.onRollOut = function(){
	//Mouse.show();
	}
monet_mc.onRelease = monet_mc.onReleaseOutside = function(){
	monet_mc.onMouseMove = null;
	}
/////////////////////////

function start3D(startX:Number, startFrame:Number){
	monet_mc.onMouseMove = function(){
		var cf:Number = Math.round(startFrame - startX + this._xmouse);
		//trace(cf);
		if(cf > max){
			cf = 1+cf-max;
			this.gotoAndStop(cf);
			startX = this._xmouse;
			startFrame = cf;
		} else if (cf < 1){
			cf = max+cf;
			this.gotoAndStop(cf);
			startX = this._xmouse;
			startFrame = cf;
		} else this.gotoAndStop(cf);
		
	}
}
__________________
Reality.getBounds(this);