📄 行星2.sqe
字号:
========== Description Part Begin ==========
name = "行星2";
description = "无数行星在宇宙里和实例一起飞行。(注意: 最好设置黑色的背景色。)";
version = "1.00";
bin = "Planets2.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nAlphaSpeed(EDIT,INT,2,1 100,"透明度变化速度","实例的透明度变化速度。");
$nMoveSpeed(EDIT,INT,10,1 100,"移动速度","实例的移动速度。");
$nScaleSpeed(EDIT,INT,5,1 100,"缩放速度","实例的缩放速度。");
$nCentreX(EDIT,INT,5,1 10000,"X","中心点(行星从这里飞出)X的值。");
$nCentreY(EDIT,INT,5,1 10000,"Y","中心点(行星从这里飞出)Y的值。");
$nInterval(EDIT,INT,3,1 10000,"时间间隔","前一个实例和后一个实例开始变化的时间间隔。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 4;
nFrameCount = 8;
nMoveSpeed = 10;
nAlphaSpeed = 2;
nScaleSpeed = 5;
nInterval = 3;
nCentreX = 180;
nCentreY = 180;
r1._x = nCentreX;
r1._y = nCentreY;
nIsRun = new Array(nCharacterCount );
nRotateArray = new Array(nCharacterCount);
nRadiusArray = new Array(nCharacterCount);
nRotate = random(360);
for( i = 1; i <= nCharacterCount; i++)
{
this["c" + i]._alpha = 100;
this["c" + i]._xscale = 0;
this["c" + i]._yscale = 0;
this["c" + i]._x = nCentreX;
this["c" + i]._y = nCentreY;
this["c" + i]._visible = false;
if(i == 1)
nIsRun[0] = 0;
else
{
nIsRun[i - 1] = nIsRun[i - 2];
nIsRun[i - 1] += nInterval;
}
nRotateArray[i - 1] = nRotate;
nRadiusArray[i - 1] = 2;
}
function fun()
{
for (i = 1; i <= nCharacterCount; i++)
{
if(nIsRun[i -1] < 0)
{
this["c" + i]._visible = true;
this["c" + i]._x = Math.cos(Math.PI / 180 * nRotateArray[i -1]) * nRadiusArray[i - 1] + nCentreX;
this["c" + i]._y = Math.sin(Math.PI / 180 * nRotateArray[i -1]) * nRadiusArray[i - 1] + nCentreY;
this["c" + i]._alpha -= nAlphaSpeed;
nRadiusArray[i -1] += nMoveSpeed;
this["c" + i]._xscale += nScaleSpeed;
this["c" + i]._yscale += nScaleSpeed;
}
nIsRun[i -1] -= 1;
}
for (i = 1; i <= nCharacterCount; i++)
{
if(this["c" + i]._alpha >= 0)
return;
}
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 ==========
========== Resource Part Begin ==========
$"Planets(rc).swf"("行星","高速飞行的行星。(您还可以选择更换其他的资源。)",3);
========== Resource Part End ==========
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -