⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 倒影.sqe

📁 flash文档文档文档文档文档文档文档文档文档文档文档文档
💻 SQE
字号:
========== Description Part Begin ==========
name = "倒影";
description = "实例形成一个圆圈,依次落在镜子上,镜子里反射出它们的倒影。";
version = "1.00";
bin = "Reflection.bin";
========== Description Part End ==========

========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,5,5 5,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nRadius(EDIT,INT,140,0 1000,"半径","由实例组成的弧形的半径。");
$nInterval(EDIT,INT,5,1 1000,"时间间隔","前一个实例和后一个实例开始变化的时间间隔。");
$nAlphaSpeed(EDIT,INT,5,1 1000,"透明度变化速度","实例的透明度变化速度。");


========== Parameter Part End ==========

========== Function Part Begin ==========
nFrameCount = 3;
nCharacterCount = 12;

nRadius = 150;
nInterval = 5;
nAlphaSpeed = 5;


nIsRun = new Array(nCharacterCount);
nRotateArray = new Array(nCharacterCount);
nRadiusArray = new Array(nCharacterCount);
nCentreX = new Array(nCharacterCount);
nCentreY = new Array(nCharacterCount);

nOldPosX = new Array(nCharacterCount);
nOldPosY = new Array(nCharacterCount);
nOldGhostPosX = new Array(nCharacterCount);
nOldGhostPosY = new Array(nCharacterCount);



for(i = 1;i <= nCharacterCount;i++)
{
	nRotateArray[i - 1] = 225;
	nRadiusArray[i - 1]  = nRadius;
	
	this["c" + i]._x -= nRadius;
	
	nOldPosX[i - 1] = this["c" + i]._x;
	nOldPosY[i - 1] = this["c" + i]._y;

	nOldGhostPosX[i - 1] = this["c" + i]._x;
	nOldGhostPosY[i - 1] = this["c" + i]._y + this["c" + i]._height;
	
	if(i == 1)
			nIsRun[0] = 0;
	else
	{
			nIsRun[i - 1] = nIsRun[i - 2];
			nIsRun[i - 1] += nInterval;
	}
	this["c" + i]._alpha = 50;
	
	
	this["c" + i].duplicateMovieClip("cc" + i + i,i);
	
	this["cc" + i + i]._y += nRadius;
	this["c" + i]._y -= nRadius;
	
	this["c" + i]._visible = false;
	this["cc" + i + i]._visible = false;
	this["cc" + i + i]._yscale = 	this["cc" + i + i]._yscale * -1;
	
}


function fadeout()
{
	if(c1._alpha < 0)
		gotoAndPlay(1);
	for(i = 1;i <= nCharacterCount;i++)
	{
		this["c" + i]._alpha -= nAlphaSpeed;
		this["cc" + i + i]._alpha -= nAlphaSpeed;		
	}	
	
	
	
	
}

function FadeoutAgain()
{
	gotoAndPlay(4);
}



function fun()
{
	for(i = 1;i <= nCharacterCount;i++)
	{
		if(nIsRun[i -1] < 0)
		{
			this["c" + i]._visible = true;
			this["cc" + i + i]._visible = true;
			if(nRotateArray[nCharacterCount -1]  == 360)
			{
				gotoAndPlay(4);
			}

			this["c" + i]._x = Math.cos(Math.PI / 180 * nRotateArray[i -1]) * nRadiusArray[i -1]  + nOldPosX[i -1];
			this["cc" + i + i]._x = Math.cos(Math.PI / 180 * (360 - nRotateArray[i -1])) * nRadiusArray[i -1]  + nOldGhostPosX[i -1];
			
			this["c" + i]._y = Math.sin(Math.PI / 180 * nRotateArray[i -1]) * nRadiusArray[i -1]  + nOldPosY[i -1];
			this["cc" + i + i]._y = Math.sin(Math.PI / 180 * (360 - nRotateArray[i -1])) * nRadiusArray[i -1]  + nOldGhostPosY[i -1];
			nRotateArray[i -1] += 5;
			if(nRotateArray[i -1] > 360)
			{
				this["c" + i]._alpha = 100;
				this["cc" + i + i]._alpha = 100;
				nRotateArray[i -1] = 360;
			}

		}
		else
			nIsrun[i -1]--;
	}

}



function again()
{
	gotoAndPlay(2);
}


========== Function Part End ==========

========== Frame Part Begin ==========
$frame(fun,1,-1,"fun");
$frame(fun,2,-1,"fun");
$frame(again,3,-1,"again");
$frame(fadeout,4,-1,"fadeout");
$frame(FadeoutAgain,5,-1,"fadeout again");
========== Frame Part End ==========


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -