📄 圆心运动3.sqe
字号:
========== Description Part Begin ==========
name = "圆心运动3";
description = "实例一个接一个的旋转。";
version = "1.00";
bin = "circling3.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数 ","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nRadius(EDIT,INT,40,1 1000,"半径","实例离圆心的距离。");
$nSpace(EDIT,INT,15,1 10000,"间距","实例之间的距离。");
$nSpeed(EDIT,INT,15,1 10000,"旋转阻力","控制旋转的速度。这个值越大,速度越慢。");
$nCentreX(EDIT,INT,0,-10000 10000,"X","圆心X的值。");
$nCentreY(EDIT,INT,0,-10000 10000,"Y","圆心Y的值。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 8;
nFrameCount = 3;
nRadius = 60;
nSpace = 30;
nSpeed = 30;
nCentreX = 100;
nCentreY = 100;
nDistanceArray = new Array(nCharacterCount);
nRotateArray = new Array(nCharacterCount);
nCentreXArray = new Array(nCharacterCount);
nWhoMove = 1;
for(i = 1;i <= nCharacterCount;i++)
{
nDistanceArray[i - 1] = nRadius;
nCentreXArray[i - 1] = nCentreX + (i)* nSpace;
nRotateArray[i -1] = 0;
}
function fun()
{
if(nRotateArray[nCharacterCount -1] > 360)
gotoAndPlay(1);
for(i = 1;i <= nCharacterCount && i <= nWhoMove;i++)
{
if( nRotateArray[i - 1] > 360)
continue;
this["c" + i]._x = nCentreXArray[i -1] + nDistanceArray[i - 1] * Math.cos(Math.PI / 180 * nRotateArray[i-1]) ;
this["c" + i]._y = nCentreY + nDistanceArray[i-1] * Math.sin(Math.PI / 180* nRotateArray[i-1]) ;
this["c" + i]._rotation = nRotateArray[i - 1];
nRotateArray[i -1] += (360/nSpeed);
if(nRotateArray[nWhoMove -1] > 75)
nWhoMove++;
}
}
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 + -