📄 扫描2.sqe
字号:
========== Description Part Begin ==========
name = "扫描2";
description = "模仿扫描的动作。(注意: 最好设置黑色的背景色。)";
version = "1.00";
bin = "scanning2.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nAlphaSpeed(EDIT,INT,1,1 100,"透明度变化速度","实例的透明度变化速度。");
$nMoveSpeed(EDIT,INT,8,1 100,"移动速度","实例的移动速度。");
$nInterval(EDIT,INT,5,1 1000,"时间间隔","前一个实例和后一个实例开始变化的时间间隔。");
$nRadius(EDIT,INT,40,1 1000,"半径","设置扫描器工作的区域。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 4;
nFrameCount = 3;
nAlphaSpeed = 1;
nMoveSpeed = 8;
nInterval = 5;
nRadius = 40;
function fun()
{
for (i = 1; nCharacterCount >= i; i++)
{
if (nIsRun[i - 1] < 0)
{
this["c" + i]._yscale = this["c" + i]._yscale + 5;
if (this["c" + i]._yscale > 100)
{
this["c" + i]._yscale = 100;
}
this["r" + i]._y = nOldPosYArray[i - 1] + Math.sin(Math.PI / 180 * nRotationArray[i - 1]) * nRadius;
this["r" + (nCharacterCount + i)]._y = nOldPosYArray[i - 1] + Math.sin(Math.PI / 180 * (nRotationArray[i - 1] * -1)) * nRadius;
this["r" + i]._alpha = this["r" + i]._alpha - nAlphaSpeed;
this["r" + (nCharacterCount + i)]._alpha = this["r" + (nCharacterCount + i)]._alpha - nAlphaSpeed;
nRotationArray[i - 1] = nRotationArray[i - 1] + nMoveSpeed;
}
nIsRun[i - 1] = nIsRun[i - 1] - 1;
}
if (this["c" + nCharacterCount]._yscale == 100 && this["r" + nCharacterCount]._alpha < 0)
{
gotoAndPlay(1);
}
}
function again()
{
gotoAndPlay(2);
}
nRotateArray = new Array(nCharacterCount);
nRadiusArray = new Array(nCharacterCount);
nIsRun = new Array(nCharacterCount);
nRotationArray = new Array(nCharacterCount);
nOldPosYArray = new Array(nCharacterCount);
for (i = 2; nCharacterCount * 2 >= i; i++)
{
this.r1.duplicatemovieclip("r" + i, i);
}
for (i = 1; nCharacterCount >= i; i++)
{
this["r" + i]._width = this["c" + i]._width * 2;
this["r" + (nCharacterCount + i)]._width = this["c" + i]._width * 2;
this["r" + i]._x = this["c" + i]._x;
this["r" + (nCharacterCount + i)]._x = this["c" + i]._x;
this["r" + i]._y = this.c1._y;
this["r" + (nCharacterCount + i)]._y = this.c1._y;
this["r" + i]._visible = true;
this["r" + i]._alpha = 100;
this["r" + (nCharacterCount + i)]._alpha = 100;
nRotationArray[i - 1] = 0;
}
for (i = 1; nCharacterCount * 2 >= i; i++)
{
nOldPosYArray[i - 1] = this["r" + i]._y;
}
for (i = 1; nCharacterCount >= i; i++)
{
this["c" + i]._alpha = 100;
this["c" + i]._yscale = 0;
this["c" + i]._rotation = 0;
if (i != 1)
{
nIsRun[i - 1] = nIsRun[i - 2];
nIsRun[i - 1] = nIsRun[i - 1] + nInterval;
}
else
{
nIsRun[0] = 0;
}
}
========== 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 ==========
$"scanner(rc).swf"("扫描器","用来扫描实例的资源。(您还可以选择更换其他的资源。)",2);
========== Resource Part End ==========
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -