📄 珊瑚虫.sqe
字号:
========== Description Part Begin ==========
name = "珊瑚虫";
description = "模仿许多珊瑚虫在海底漫游的场景。";
version = "1.00";
bin = "Coral.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nAlphaSpeed(EDIT,INT,3,1 100,"透明度变化速度","实例的透明度变化速度。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nFrameCount = 3;
nCharacterCount = 4;
nAlphaSpeed = 3;
bPlanktonMode = true;
num=0;
nIsRun = new Array(nCharacterCount);
bMode = new Array(nCharacterCount);
r1._x = c1._x;
r1._y = c1._y + c1._height/2;
for (i = 1; nCharacterCount >= i; i++)
{
this["c" + i]._alpha = 0;
bMode[i - 1] = true;
nIsRun[i - 1] = random(nCharacterCount *2);
}
function fun()
{
if(bMode)
{
r1._x += 0.05;
if(r1._x > this["c" + nCharacterCount]._x)
bPlanktonMode = false;
}
else
{
r1._x -= 0.05;
if(r1._x < c1._x)
bPlanktonMode = true;
}
for (i = 1;i <= nCharacterCount; i++)
{
nIsRun[i - 1] -= 1;
if(nIsRun[i - 1] < 0)
{
if(bMode[i - 1])
{
this["c" + i]._alpha += nAlphaSpeed;
if(this["c" + i]._alpha > 100)
{
bMode[i -1] = false;
this["c" + i]._alpha = 100;
}
}
else
{
this["c" + i]._alpha -= nAlphaSpeed;
if(this["c" + i]._alpha < 0)
{
bMode[i -1] = true;
this["c" + i]._alpha = 0;
}
}
}
}
}
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 ==========
========== Resource Part Begin ==========
$"Coral(rc).swf"("珊瑚虫","珊瑚虫资源。(您还可以选择更换其他的资源。)",4);
========== Resource Part End ==========
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -