description = "Each character reduces to a certain size and its shadow appears. ";
version = "1.00";
bin = "FadingShadow3.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
$nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
$nChangeSpeed(EDIT,INT,3,1 100,"Scaling Speed","To control the speed of character scaling.");
$nAlphaSpeed(EDIT,INT,5,1 100,"Fading Speed","To control the speed of character fading.");
$nMaxSize(EDIT,INT,300,100 10000,"Max Size","The maximum size of characters.");
========== Parameter Part End ==========
========== Function Part Begin ==========
nFrameCount = 10;
nCharacterCount = 4;
nMaxSize = 300;
nAlphaSpeed = 5;
nChangeSpeed = 3;
nChangeSize = 0;
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;
this["c" + i]._xscale = nMaxSize;
this["c" + i]._yscale = nMaxSize;
this["c" + i]._alpha = 0;
}
function again()
{
gotoAndPlay(2);
}
function fun()
{
nChangeSize += nChangeSpeed;
if(c1._xscale <= nOriginalSizeX[0])
{
CopyObject();
return ;
}
for (i = 1; i <= nCharacterCount; i++)
{
this["c" + i]._xscale -= nChangeSize;
this["c" + i]._yscale -= nChangeSize;
if(this["c" + i]._xscale < nOriginalSizeX[i - 1])
{
this["c" + i]._xscale = nOriginalSizeX[i - 1];
this["c" + i]._yscale = nOriginalSizeY[i - 1];
}
this["c" + i]._alpha += nAlphaSpeed;
}
}
function CopyObject()
{
depth = nCharacterCount;
for (i = 1; i <= nCharacterCount; i++)
{
this["c" + i].duplicateMovieClip("t"+ i + 1, ++depth);