📄 滑行.sqe
字号:
========== Description Part Begin ==========
name = "滑行";
description = "所有实例起初待在一起,随后移动到指定的位置。";
version = "1.00";
bin = "sliding.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数 ","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nMoveSpeed(EDIT,INT,5,1 100,"移动阻力","这个值越大,移动的速度越慢。");
$nIntervalTime(EDIT,INT,1,1 10000,"时间间隔","前一个实例和后一个实例开始移动的时间间隔。");
$nAlphaSpeed(EDIT,INT,5,1 100,"透明度变化速度","实例的透明度变化速度。");
$nXExcursion(EDIT,INT,0,-1000 1000,"水平偏移","相对于实例中心点的水平偏移位置。");
$nYExcursion(EDIT,INT,50,-1000 1000,"垂直偏移","相对于实例中心点的垂直偏移位置。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 26;
nFrameCount = 3;
nMoveSpeed = 5;
nIntervalTime = 1;
nAlphaSpeed = 5;
nYExcursion = 100;
nXExcursion = 0;
nPosX = this["c1"]._x + (this["c" + nCharacterCount]._x - this["c1"]._x )/ 2 + nXExcursion;
for(i = 0;i < nCharacterCount;i++)
{
nHeight += this["c" + (i + 1)]._y;
}
nPosY = int(nHeight / nCharacterCount) + nYExcursion;
nOldPosX = new Array(nCharacterCount - 1);
nOldPosY = new Array(nCharacterCount - 1);
nTempTime = nIntervalTime;
nRun = 1;
function init()
{
for(i = 0;i < nCharacterCount;i++)
{
nOldPosX[i] = this["c" + (i + 1)]._x;
nOldPosY[i] = this["c" + (i + 1)]._y;
}
for(i = 0;i < nCharacterCount ;i++)
{
this["c" + (i + 1)]._x = nPosX;
this["c" + (i + 1)]._y = nPosY;
this["c" + (i + 1)]._alpha = 0;
}
}
function fun()
{
if(nTempTime > 0)
nTempTime--;
else
{
if(nRun < nCharacterCount)
nRun++;
nTempTime = nIntervalTime;
}
for (i = 0; i < nRun; i++)
{
if(this["c" + (i + 1)]._alpha < 100)
{
this["c" + (i + 1)]._alpha += nAlphaSpeed;
if(this["c" + (i + 1)]._alpha > 100)
this["c" + (i + 1)]._alpha = 100;
}
if(this["c" + (i + 1)]._y != nOldPosY[i])
{
if(this["c" + (i + 1)]._y > nOldPosY[i])
{
this["c" + (i + 1)]._y -= nMoveSpeed;
if(this["c" + (i + 1)]._y < nOldPosY[i])
this["c" + (i + 1)]._y = nOldPosY[i];
}
else
{
this["c" + (i + 1)]._y += nMoveSpeed;
if(this["c" + (i + 1)]._y >nOldPosY[i])
this["c" + (i + 1)]._y = nOldPosY[i];
}
this["c" + (i + 1)]._x = (nPosX - nOldPosX[i]) / (nPosY - nOldPosY[i]) * (this["c" + (i + 1)]._y - nOldPosY[i]) + nOldPosX[i];
}
}
}
function again()
{
gotoAndPlay(2);
}
========== Function Part End ==========
========== Frame Part Begin ==========
$frame(init,1,-1,"init");
$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 + -