Показать сообщение отдельно
Старый 21.08.2007, 16:42
telit вне форума Посмотреть профиль Отправить личное сообщение для telit Найти все сообщения от telit
  № 3  
Ответить с цитированием
telit
 
Аватар для telit

Регистрация: Jul 2007
Сообщений: 306
Код:
function thumbnails_fn_r(kr) {
	r_menu.createEmptyMovieClip("t"+kr, r_menu.getNextHighestDepth());
	tlistener_r = new Object();
	tlistener_r.onLoadInit = function(target_mc_r) {
		if ((kr%2)!=0) {
		target_mc_r._y = hit_top._y+(128-60)*(kr-1);
		target_mc_r._x = 140;
		} else {
			target_mc_r._y = hit_top._y+(128-60)*kr;
		}
		target_mc_r._xscale = target_mc_r._yscale = 50;
		target_mc_r.pictureValue_r = kr;
		
		target_mc_r.onRollOver = function() {
			this._alpha = 50;
			//if (_root.flagPress == 0)
			thumbNailScroller_r();
		};
		target_mc_r.onRollOut = function() {
			this._alpha = 100;
		};
		
		target_mc_r.onPress = processPressClip;
	};
	image_mcl_r = new MovieClipLoader();
	image_mcl_r.addListener(tlistener_r);
	image_mcl_r.loadClip(thumbnails_r[kr], "r_menu.t"+kr);
}



var currentTarget:MovieClip;

function dup(m_mc:MovieClip)
{
	var nextDepth:Number = _root.r_menu.getNextHighestDepth();
	m_mc.duplicateMovieClip("f_mc"+nextDepth, nextDepth);
	
	var duppedClip:MovieClip = _root.r_menu["f_mc"+nextDepth];
	
	currentTarget = duppedClip;
	
	duppedClip.onPress = processPressClip;
	duppedClip.onRelease = processReleaseClip;
	
	duppedClip.startDrag();
}

this.onMouseUp = function()
{
	if(currentTarget != null)
	{
	currentTarget.stopDrag();
	if (currentTarget.hitTest(_root.box)) trace("good");
	}
	//trace(currentTarget);
	removeMovieClip(currentTarget);
	currentTarget = null;
}

function processReleaseClip()
{
	this.stopDrag();	
}

function processPressClip()
{
	this._parent._parent.dup(this);
}
как исправить?