Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

alanrg.83

s com um action

Recommended Posts

Gente estou usando este action para giar uma movimentação muito legal no fla!

Mas ao clicar nos thumbs ele faz um efeito que gostaria de remover!

Que parte deste código esta controlando o click??

stop ();_root.animation = 1;_root.accel = 2.000000E-001;_root.rate = 2.000000E-001;width = 1;var myDepth = 1;var max_width = new Array(10, 30, 10, 30, 10, 10, 30, 10, 30, 10);var max_height = new Array(10, 10, 10, 10, 10, 10, 10, 10, 10, 10);var min_width = new Array(-3, 0, -3, 0, -2, 0, -1, 0, -2, -3);var min_height = new Array(-5, -5, -2, 0, -3, 0, -10, 0, -3, -2);var myRatio = new Array(8.000000E-002, 6.000000E-002, 9.000000E-002, 6.000000E-002, 1.000000E-001, 8.000000E-002, 6.000000E-002, 8.000000E-002, 1.000000E-001, 6.000000E-002);var myRatio2 = new Array(1.200000E+000, 2.400000E-001, 4.500000E-001, 3.800000E-001, 3.600000E-001, 4.200000E-001, 2.500000E-001, 3.400000E-001, 3.200000E-001, 2.400000E-001);var myRatio3 = new Array(3.200000E-001, 3.400000E-001, 2.800000E-001, 3.200000E-001, 3.300000E-001, 4.200000E-001, 4.400000E-001, 3.200000E-001, 3.800000E-001, 4.400000E-001);var out_x = new Array(-200, 1200, -200, 1200, -200, 1200, -200, 1200, -200, 1200);for (i = 1; i <= 10; i++){	this["ratio_x" + i] = (max_width[i - 1] - min_width[i - 1]) / max_width[i - 1];	this["ratio_y" + i] = (max_height[i - 1] - min_height[i - 1]) / max_height[i - 1];	this["archives_thum" + i].start_x = this["archives_thum" + i]._x;	this["archives_thum" + i].start_y = this["archives_thum" + i]._y;	this["archives_thum" + i].onRollOver = function ()	{		if (this._width < 200)		{			_root.playSound1();			++myDepth;			this.swapDepths(myDepth);			this.gotoAndPlay("s1");		} // end if	};	this["archives_thum" + i].onRollOut = this["archives_thum" + i].onReleaseOutside = function ()	{		if (this._width < 200)		{			++myDepth;			this.gotoAndPlay("s2");		} // end if	};	this["archives_thum" + i].onRelease = function ()	{		++myDepth;		this.swapDepths(myDepth);		num = this._name.substring(13);		if (this._width < 200)		{			fadeOut2(num);		}		else		{			targetvalue = 100;			fadeIn(num);		} // end else if	};} // end of forslideThum = function (){	for (i = 1; i <= 10; i++)	{		this["archives_thum" + i].onEnterFrame = function ()		{			var _loc2 = this._name.substring(13);			this.trg_x = (_xmouse - 500) / 6.400000E+000 * this._parent["ratio_x" + _loc2];			this.trg_y = (_ymouse - 335) / 6.400000E+000 * this._parent["ratio_y" + _loc2];			this._x = this._x + (-this.trg_x - this._x + max_width[_loc2 - 1] + this.start_x) * myRatio[_loc2 - 1];			this._y = this._y + (-this.trg_y - this._y + max_height[_loc2 - 1] + this.start_y) * myRatio[_loc2 - 1];		};	} // end of for};fadeOut = function (){	for (i = 1; i <= 10; i++)	{		delete this["archives_thum" + i].onEnterFrame;	} // end of for	for (i = 1; i <= 10; i++)	{		this["archives_thum" + i].onEnterFrame = function ()		{			var _loc2 = this._name.substring(13);			this.trg = out_x[_loc2 - 1];			this.speed = (this.trg - this._x) * myRatio2[_loc2 - 1];			this._x = this._x + this.speed;			if (Math.abs(this.speed) < 1.000000E-001)			{				delete this.onEnterFrame;				if (_loc2 == 1)				{					this._parent._parent.fadeOut();				} // end if			} // end if		};	} // end of for};fadeOut2 = function (num){	for (i = 1; i <= 10; i++)	{		if (i != num)		{			delete this["archives_thum" + i].onEnterFrame;		} // end if	} // end of for	for (i = 1; i <= 10; i++)	{		if (i != num)		{			this["archives_thum" + i].onEnterFrame = function ()			{				var _loc2 = this._name.substring(13);				this.trg = out_x[_loc2 - 1];				this.speed = (this.trg - this._x) * myRatio2[_loc2 - 1];				this._x = this._x + this.speed / 2;				if (Math.abs(this.speed) < 1.000000E-001)				{					delete this.onEnterFrame;					if (_loc2 == 1)					{						this._parent._parent.fadeOut2(num);					} // end if				} // end if			};		} // end if		if (i == num)		{			targetvalue = 330;			s = new Sound();			s.attachSound("sound_over");			s.start(0, 1);			this["archives_thum" + i].gotoAndStop(10);			this["archives_thum" + i].onEnterFrame = function ()			{				width = width * _root.accel + (targetvalue - this._xscale) * _root.rate;				this._xscale = this._xscale + width;				this._yscale = this._yscale + width;				var _loc3 = this._name.substring(13);				this.trg_x = (_xmouse - 500) / 2.400000E+000 * this._parent["ratio_x" + _loc3];				this.trg_y = (_ymouse - 335) / 2.400000E+000 * this._parent["ratio_y" + _loc3];				this._x = this._x + (-this.trg_x - this._x + max_width[_loc3 - 1] + this.start_x) * myRatio[_loc3 - 1];				this._y = this._y + (-this.trg_y - this._y + max_height[_loc3 - 1] + this.start_y) * myRatio[_loc3 - 1];			};		} // end if	} // end of for};fadeIn = function (num){	s = new Sound();	s.attachSound("sound_over2");	s.start(0, 1);	for (i = 1; i <= 10; i++)	{		if (i != num)		{			this["archives_thum" + i]._x = out_x[i - 1];			this["archives_thum" + i].onEnterFrame = function ()			{				var _loc2 = this._name.substring(13);				this.trg = this.start_x;				this.speed = (this.trg - this._x) * myRatio3[_loc2 - 1];				this._x = this._x + this.speed;				this._xscale = 100;				this._yscale = 100;				if (Math.abs(this.speed) < 1.000000E-001)				{					delete this.onEnterFrame;					if (_loc2 == 0)					{						slideThum();					} // end if					slideThum();				} // end if			};			continue;		} // end if		this["archives_thum" + i].gotoAndPlay("s2");	} // end of for};fadeIn();

Compartilhar este post


Link para o post
Compartilhar em outros sites

É só procurar pelos onRelease, que significa "quando soltar o clique".

 

this["archives_thum" + i].onRelease = function ()	{		++myDepth;		this.swapDepths(myDepth);		num = this._name.substring(13);		if (this._width < 200)		{			fadeOut2(num);		}		else		{			targetvalue = 100;			fadeIn(num);		} // end else if	};

Flw

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.