📄 散开.sqe
字号:
========== Description Part Begin ==========
name = "散开";
description = "实例从特定的中心点向外随机散开。";
version = "1.00";
bin = "scattering.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nSpeed(EDIT,INT,10,1 100,"速度","实例散开的速度。");
$nRadius(EDIT,INT,140,1 10000,"距离","实例散开后离特定中心点的距离。");
$nCentreX(EDIT,INT,0,-10000 10000,"X","中心点X的值。");
$nCentreY(EDIT,INT,0,-10000 10000,"Y","中心点Y的值。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 16;
nFrameCount = 8;
nSpeed = 10;
nCentreX = 100;
nCentreY = 200;
nRadius = 150;
nRotateArray = new Array(nCharacterCount);
nRadiusArray = new Array(nCharacterCount);
for (i = 1; nCharacterCount >= i; i++)
{
this["c" + i]._alpha = 100;
this.c1._x = nCentreX;
this.c1._y = nCentreY;
nRotateArray[i - 1] = random(360);
nRadiusArray[i - 1] = 2;
}
function fun()
{
for (i = 1; nCharacterCount >= i; i++)
{
this["c" + i]._x = Math.cos(0.017453 * nRotateArray[i - 1]) * nRadiusArray[i - 1] + nCentreX;
this["c" + i]._y = Math.sin(0.017453 * nRotateArray[i - 1]) * nRadiusArray[i - 1] + nCentreY;
nRadiusArray[i - 1] = nRadiusArray[i - 1] + nSpeed;
}
if(nRadiusArray[nCharacterCount - 1] > nRadius)
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 + -