?? 移動(dòng)翻轉(zhuǎn)2.sqe
字號(hào):
========== Description Part Begin ==========
name = "移動(dòng)翻轉(zhuǎn)2";
description = "當(dāng)實(shí)例移動(dòng)到各自的目的時(shí)才開始翻轉(zhuǎn)。";
version = "1.00";
bin = "overturning2.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"實(shí)例總數(shù)","指的是使用了該特效的實(shí)例的總數(shù)。這個(gè)值是由影片里所選中的實(shí)例數(shù)決定的,在這里不能設(shè)置。");
$nFrameCount(EDIT,INT,3,3 3,"總幀數(shù)","指的是含有動(dòng)作代碼的總幀數(shù)。特效播放的總幀數(shù)可能比動(dòng)作代碼的幀數(shù)多。");
$nInterval(EDIT,INT,5,1 1000,"時(shí)間間隔","前一個(gè)實(shí)例和后一個(gè)實(shí)例開始移動(dòng)的時(shí)間間隔。");
$nSpeed(EDIT,INT,10,1 10000,"移動(dòng)速度","實(shí)例的移動(dòng)速度。");
$nLeft(EDIT,INT,-100,-1000 10000,"左","左起始點(diǎn)的位置。");
$nRight(EDIT,INT,500,1 10000,"右","右起始點(diǎn)的位置。");
$bDirection(LIST,INT,1,"左":1 "右":0,"方向","控制實(shí)例從左到右,或從右到左進(jìn)入影片。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 8;
nFrameCount = 30;
nInterval = 5;
nSpeed = 10;
nLeft = 0;
nRight = 500;
bDirection = true;
nIsRun = new Array(nCharacterCount + 1);
nXArray = new Array(nCharacterCount);
nOriginalSizeX = new Array(nCharacterCount);
nOriginalSizeY = new Array(nCharacterCount);
for (i = 1; i <= nCharacterCount ; i++)
{
nOriginalSizeX[i - 1] = this["c" + i ]._xscale;
nOriginalSizeY[i - 1] = this["c" + i ]._yscale;
nXArray[i -1] = this["c" + i]._x;
this["c" + i]._xscale = this["c" + i]._xscale * -1;
if(bDirection)
this["c" + i]._x = nLeft;
else
this["c" + i]._x = nRight;
this["c" + i]._alpha = 10;
this["c" + i]._visible = false;
}
for (i = 1; i <= nCharacterCount + 1; i++)
{
if(!bDirection)
{
if(i == 1)
nIsRun[0] = 0;
else
{
nIsRun[i - 1] = nIsRun[i - 2];
nIsRun[i - 1] += nInterval;
}
}
else
{
if(i == 1)
nIsRun[nCharacterCount -1] = 0;
else
{
nIsRun[nCharacterCount - i] = nIsRun[nCharacterCount - (i -1) ];
nIsRun[nCharacterCount - i] += nInterval ;
}
}
}
function fun()
{
for (i = 1;i <= nCharacterCount ; i++)
{
if(nIsRun[i - 1] < 0)
{
this["c" + i]._visible = true;
if(bDirection)
{
this["c" + i]._x += nSpeed;
if(this["c" + i]._x >= nXArray[i -1])
{
if(this["c" + i]._x > nXArray[i -1])
this["c" + i]._x = nXArray[i -1];
if(this["c" + i]._xscale < nOriginalSizeX[i - 1])
this["c" + i]._xscale += nSpeed;
this["c" + i]._alpha += 2;
continue;
}
}
else
{
this["c" + i]._x -= nSpeed;
if(this["c" + i]._x <= nXArray[i -1])
{
if(this["c" + i]._x < nXArray[i -1])
this["c" + i]._x = nXArray[i -1];
if(this["c" + i]._xscale < nOriginalSizeX[i - 1])
this["c" + i]._xscale += nSpeed;
this["c" + i]._alpha += 2;
continue;
}
}
}
nIsRun[i -1]--;
}
if(!bDirection)
{
if(this["c" + nCharacterCount]._xscale >= nOriginalSizeX[nCharacterCount - 1])
{
if(this["c" + nCharacterCount]._x <= nXArray[nCharacterCount -1])
{
for (i = 1; i <= nCharacterCount ; i++)
{
this["c" + i]._x = nXArray[i -1];
}
gotoAndPlay(1);
}
}
}
else
{
if(this["c" + 1]._xscale >= nOriginalSizeX[0])
{
if(this["c" + 1]._x >= nXArray[0])
{
for (i = 1; i <= nCharacterCount ; i++)
{
this["c" + i]._x = nXArray[i -1];
}
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 ==========
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -