📄 翻转3.sqe
字号:
========== Description Part Begin ==========
name = "翻转3";
description = "当一个实例翻转到一定的角度,下一个实例就开始翻转。";
version = "1.00";
bin = "rotation3.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nSpeed(EDIT,INT,3,1 50,"透明度变化速度","实例的透明度变化速度。");
$nRotationSpeed(EDIT,INT,10,1 360,"旋转速度","实例的旋转速度。");
$nScaleSpeed(EDIT,INT,10,1 100,"缩放速度","实例的缩放速度。");
$nInterval(EDIT,INT,8,1 1000,"时间间隔","前一个实例和后一个实例开始旋转的时间间隔。");
$bMode(LIST,INT,0,"F":0 "T":1,"方式","F: 绕Y轴旋转并缩放; T: 绕X轴旋转并缩放。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 8;
nFrameCount = 3;
nSpeed = 3;
nRotationSpeed = 10;
nScaleSpeed = 10;
nInterval = 40;
bMode = 0;
nCharacter_x = new Array(nCharacterCount);
nCharacter_y = new Array(nCharacterCount);
nCharacter_width = new Array(nCharacterCount);
nCharacter_height = new Array(nCharacterCount);
nIsRun = new Array(nCharacterCount);
nWhoRun = 1;
bkInterval = nInterval;
nOriginalSizeX = new Array(nCharacterCount);
nOriginalSizeY = new Array(nCharacterCount);
for (i = 1; nCharacterCount >= i; i++)
{
this["c" + i]._alpha = 100;
this["c" + i]._rotation = 0;
//this["c" + i]._xscale = 100;
//this["c" + i]._yscale = 100;
nOriginalSizeX[i - 1] = this["c" + i ]._xscale;
nOriginalSizeY[i - 1] = this["c" + i ]._yscale;
nCharacter_x[i - 1] = this["c" + i]._x;
nCharacter_y[i - 1] = this["c" + i]._y;
nCharacter_width[i - 1] = this["c" + i]._width;
nCharacter_height[i - 1] = this["c" + i]._height;
nIsRun[i - 1] = true;
}
function fun()
{
for (i = 1; nCharacterCount >= i && nWhoRun >= i; i++)
{
if (nIsRun[i - 1])
{
if( bMode )
{
this["c" + i]._xscale = this["c" + i]._xscale - nScaleSpeed;
this["c" + i]._yscale = this["c" + i]._yscale + nScaleSpeed;
}
else
{
this["c" + i]._xscale = this["c" + i]._xscale + nScaleSpeed;
this["c" + i]._yscale = this["c" + i]._yscale - nScaleSpeed;
}
this["c" + i]._alpha = this["c" + i]._alpha - nSpeed;
this["c" + i]._rotation = this["c" + i]._rotation + nRotationSpeed;
if (this["c" + i]._alpha < 0)
{
nIsRun[i - 1] = false;
restart(i);
}
}
}
if (nWhoRun == nCharacterCount && this["c" + nCharacterCount]._xscale == 100)
{
nWhoRun = 1;
i = 1;
while (nCharacterCount >= i)
{
nIsRun[i - 1] = true;
i++;
}
}
if (nInterval < 1)
{
nInterval = bkInterval;
nWhoRun++;
if (nCharacterCount < nWhoRun)
{
nWhoRun = nCharacterCount;
}
}
nInterval--;
}
function restart(nIndex)
{
this["c" + nIndex]._x = nCharacter_x[nIndex - 1];
this["c" + nIndex]._y = nCharacter_y[nIndex - 1];
this["c" + nIndex]._width = nCharacter_width[nIndex - 1];
this["c" + nIndex]._height = nCharacter_height[nIndex - 1];
this["c" + nIndex]._alpha = 100;
this["c" + nIndex]._rotation = 0;
this["c" + i]._xscale = nOriginalSizeX[i - 1];
this["c" + i]._yscale = nOriginalSizeY[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 Part End ==========
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -