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

📄 气球.sqe

📁 flash文档文档文档文档文档文档文档文档文档文档文档文档
💻 SQE
字号:
========== Description Part Begin ==========
name = "气球";
description = "实例和气球一起徐徐向上升起。(注意: 最好设置黑色的背景色。)";
version = "1.00";
bin = "balloon.bin";
========== Description Part End ==========

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

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

========== Function Part Begin ==========
nCharacterCount = 5;
nFrameCount = 8;
nAlphaSpeed = 5;
nMoveSpeed = 5;

nInterval = 10;


nIsRun = new Array(nCharacterCount);
nOldPosX = new Array(nCharacterCount);
nOldPosY = new Array(nCharacterCount);
bSignArray = new Array(nCharacterCount);


for(i = 2;i <= nCharacterCount ;i++)
{
		this["r1"].duplicateMovieClip("r"+i, i);
}



for (i =  1; i <= nCharacterCount ; i++)
{
		nOldPosX[i - 1] = this["c" + i]._x;
		nOldPosY[i - 1] = this["c" + i]._y;
		bSignArray[i -1] = true;



		this["r" +i]._x =  	this["c" + i]._x;
		this["r" + i]._y = 	this["c" + i]._y;
		
		
		nTemp1 = this["c" + i]._width;
		nTemp2 = this["c" + i]._height;
		
		
		if(this["c" + i]._width > this["c" + i]._height)
		{
			this["r" +i]._width = this["c" + i]._width * 3.2;		
			this["r" +i]._height = this["r" + i]._width * 2.5;		
		}
		else
		{
			this["r" +i]._height = this["c" + i]._height * 6.5;
			this["r" +i]._width = this["r" +i]._height / 2.5;		
			
		}
		
		
		this["r" + i]._visible = 	true;
		this["r" + i]._alpha = 	0;

}

for (i = 1; i <= nCharacterCount ; i++)
{
    this["c" + i]._alpha = 0;
		if(i == 1)
			nIsRun[0] = 10;
		else
		{
			nIsRun[i - 1] = nIsRun[i - 2];
			nIsRun[i - 1] += nInterval;
		}

}

function fun()
{

	for (i = 1;i <= nCharacterCount ; i++)
    {
		if(nIsRun[i - 1] < 0)
		{
			if(bSignArray[i -1])
			{
				this["r" + i]._alpha += nAlphaSpeed;
				this["c" + i]._alpha += nAlphaSpeed;
			}
			else
			{
				this["r" + i]._alpha -= nAlphaSpeed;
				this["c" + i]._alpha -= nAlphaSpeed;
			}

			this["c" + i]._y -= nMoveSpeed;
			this["r" + i]._y -= nMoveSpeed;
			
			
			
			if(this["r" + i]._alpha > 100)
				bSignArray[i -1] = false;
		}
		
		nIsRun[i -1] --;
	
	} 
 


	if(this.c1._alpha < 0 && this["r" + nCharacterCount]._alpha < 0)
	{
		for (i = 1;i <= nCharacterCount ; i++)
    	{
			this["c" + i]._x = nOldPosX[i - 1];
			this["c" + i]._y = nOldPosY[i - 1];
		}

		gotoAndPlay(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 Part End ==========

========== Resource Part Begin ==========
$"balloon(rc).swf"("气球","飞动的气球。(您还可以选择更换其他的资源。)",10);
========== Resource Part End ==========




⌨️ 快捷键说明

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