?? 倒影2.sqe
字號:
========== Description Part Begin ==========
name = "倒影2";
description = "實例分成兩組,形成兩個圓圈,依次落在鏡子上,鏡子里反射出它們的倒影。";
version = "1.00";
bin = "Reflection2.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"實例總數","指的是使用了該特效的實例的總數。這個值是由影片里所選中的實例數決定的,在這里不能設置。");
$nFrameCount(EDIT,INT,5,5 5,"總幀數","指的是含有動作代碼的總幀數。特效播放的總幀數可能比動作代碼的幀數多。");
$nRadius(EDIT,INT,110,0 1000,"半徑","由實例組成的弧形的半徑。");
$nInterval(EDIT,INT,5,0 1000,"時間間隔","前一個實例和后一個實例開始變化的時間間隔。");
$nAlphaSpeed(EDIT,INT,3,0 1000,"透明度變化速度","實例的透明度變化速度。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nFrameCount = 5;
nCharacterCount = 13;
nRadius = 140;
nInterval = 5;
nAlphaSpeed = 3;
nIsRun = new Array(nCharacterCount);
nRotateArray = new Array(nCharacterCount);
nRadiusArray = new Array(nCharacterCount);
nCentreX = new Array(nCharacterCount);
nCentreY = new Array(nCharacterCount);
nOldPosX = new Array(nCharacterCount);
nOldPosY = new Array(nCharacterCount);
nOldGhostPosX = new Array(nCharacterCount);
nOldGhostPosY = new Array(nCharacterCount);
for(i = 1;i <= nCharacterCount;i++)
{
if(i <= nCharacterCount/2)
nRotateArray[i - 1] = 225;
else
nRotateArray[i - 1] = 315;
nRadiusArray[i - 1] = nRadius;
if(i <= nCharacterCount/2)
this["c" + i]._x -= nRadius;
else
this["c" + i]._x += nRadius;
nOldPosX[i - 1] = this["c" + i]._x;
nOldPosY[i - 1] = this["c" + i]._y;
nOldGhostPosX[i - 1] = this["c" + i]._x;
nOldGhostPosY[i - 1] = this["c" + i]._y + this["c" + i]._height;
if(i == 1 || i == nCharacterCount)
{
nIsRun[0] = 0;
nIsRun[nCharacterCount -1] = 0;
}
else
{
if(i <= nCharacterCount/2)
{
nIsRun[i - 1] = nIsRun[i - 2];
nIsRun[i - 1] += nInterval;
}
else
{
multiple = nCharacterCount - i ;
nIsRun[i - 1] = multiple * nInterval;
//nIsRun[i -1] = nIsRun[nCharacterCount - i];
}
}
this["c" + i]._alpha = 50;
this["c" + i].duplicateMovieClip("cc" + i + i,i);
this["cc" + i + i]._y += nRadius;
this["c" + i]._y -= nRadius;
this["c" + i]._visible = false;
this["cc" + i + i]._visible = false;
this["cc" + i + i]._yscale = this["cc" + i + i]._yscale * -1;
}
function fadeout()
{
if(c1._alpha < 0)
gotoAndPlay(1);
for(i = 1;i <= nCharacterCount;i++)
{
this["c" + i]._alpha -= nAlphaSpeed;
this["cc" + i + i]._alpha -= nAlphaSpeed;
}
}
function FadeoutAgain()
{
gotoAndPlay(4);
}
function IsAllCharacterEnd()
{
bIsEnd = true;
for(n = 1;n <= nCharacterCount;n++)
{
if(this["c" + n]._alpha != 100)
{
bIsEnd = 0;
break;
}
}
if(bIsEnd)
gotoAndPlay(4);
}
function fun()
{
for(i = 1;i <= nCharacterCount;i++)
{
if(nIsRun[i -1] < 0)
{
this["c" + i]._visible = true;
this["cc" + i + i]._visible = true;
IsAllCharacterEnd();
this["c" + i]._x = Math.cos(Math.PI / 180 * nRotateArray[i -1]) * nRadiusArray[i -1] + nOldPosX[i -1];
this["cc" + i + i]._x = Math.cos(Math.PI / 180 * (360 - nRotateArray[i -1])) * nRadiusArray[i -1] + nOldGhostPosX[i -1];
this["c" + i]._y = Math.sin(Math.PI / 180 * nRotateArray[i -1]) * nRadiusArray[i -1] + nOldPosY[i -1];
this["cc" + i + i]._y = Math.sin(Math.PI / 180 * (360 - nRotateArray[i -1])) * nRadiusArray[i -1] + nOldGhostPosY[i -1];
if(i <= nCharacterCount / 2)
{
nRotateArray[i -1] += 5;
if(nRotateArray[i -1] > 360)
{
this["c" + i]._alpha = 100;
this["cc" + i + i]._alpha = 100;
nRotateArray[i -1] = 360;
}
}
else
{
nRotateArray[i -1] -= 5;
if(nRotateArray[i -1] < 180)
{
this["c" + i]._alpha = 100;
this["cc" + i + i]._alpha = 100;
nRotateArray[i -1] = 180;
}
}
}
else
nIsrun[i -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(fadeout,4,-1,"fadeout");
$frame(FadeoutAgain,5,-1,"fadeout again");
========== Frame Part End ==========
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -