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

📄 组合.sqe

📁 flash文档文档文档文档文档文档文档文档文档文档文档文档
💻 SQE
字号:
========== Description Part Begin ==========
name = "组合";
description = "两组实例相向移动直到重合为一组。";
version = "1.00";
bin = "Combination.bin";
========== Description Part End ==========

========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nAlphaChangeSpeed(EDIT,INT,3,1 100,"透明度变化速度","实例的透明度变化速度。");
$nMoveSpeed(EDIT,INT,2,1 100,"移动速度","实例的移动速度。");
$nSetSpace(EDIT,INT,120,10 1000,"间距","两组实例之间的距离。");

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

========== Function Part Begin ==========
nFrameCount = 10;
nCharacterCount = 4;
nMoveSpeed = 5;
nAlphaChangeSpeed = 2;
nSetSpace = 200;




nSpace = nSetSpace/2;
nBakCharacter_x = new Array(nCharacterCount);

for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
{
	this["c" + (i - nCharacterCount)].duplicateMovieClip("c"+i, i);
	this["c" + i]._x += nSpace;
	this["c" + i]._alpha = 10;
}

for (i = 1; i <= nCharacterCount; i++)
{
	nBakCharacter_x[i -1] = 	this["c" + i]._x;
	this["c" + i]._x -= nSpace;
	this["c" + i]._alpha = 10;
}



	
	
function fun()
{
	
	for (i = 1; i <= nCharacterCount; i++)
	{
		this["c" + i]._x += nMoveSpeed;
		this["c" + i]._alpha += nAlphaChangeSpeed;
	}

	
	for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
	{
		this["c" + i]._x -= nMoveSpeed;
		this["c" + i]._alpha += nAlphaChangeSpeed;
	}

	nSpace -= nMoveSpeed;
	if(nSpace < 0)
	{
		for (i = 1; i <= nCharacterCount; i++)
		{
			this["c" + i]._x = nBakCharacter_x[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 ==========

⌨️ 快捷键说明

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