?? 絢彩方塊.sqe
字號:
========== Description Part Begin ==========
name = "絢彩方塊";
description = "在絢彩方塊背景下,實例顏色不停變幻。";
version = "1.00";
bin = "ColorfulFlare.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"實例總數","指的是使用了該特效的實例的總數。這個值是由影片里所選中的實例數決定的,在這里不能設置。");
$nFrameCount(EDIT,INT,3,3 3,"總幀數","指的是含有動作代碼的總幀數。特效播放的總幀數可能比動作代碼的幀數多。");
$nX(EDIT,INT,20,1 100,"行","絢彩方塊的總行數。");
$nY(EDIT,INT,10,1 100,"列","絢彩方塊的總列數。");
$nSpace(EDIT,INT,2,-100 10000,"間距","方塊之間的距離。");
$nStartPosX(EDIT,INT,0,-1000 10000,"X","左上角那個方塊位置的X值。");
$nStartPosY(EDIT,INT,0,-1000 10000,"Y","左上角那個方塊位置的Y值。");
$nWidth(EDIT,INT,15,1 10000,"寬","一個方塊的寬度。");
$nHeight(EDIT,INT,15,1 10000,"高","一個方塊的高度。");
$bIsCharacterChange(LIST,INT,1,"是":1 "否":0,"是否改變顏色","設定實例的顏色是否改變。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 8;
nFrameCount = 4;
nX = 20;
nY = 10;
nSpace = 3;
nStartPosX = 50;
nStartPosY = 50;
nWidth = 15;
nHeight = 15;
bIsCharacterChange = true;
nIndex = 0;
nPosX = nStartPosX;
nPosY = nStartPosY;
r1._width = nWidth;
r1._height = nHeight;
for(i = 1;i <= nY;i++)
{
if(i != 1)
{
nPosY = nPosY + r1._height + nSpace;
nPosX = nStartPosX;
}
for(n = 1;n <= nX;n++)
{
nIndex++;
this.r1.duplicateMovieClip("r1"+nIndex, nIndex);
nPosX = nPosX + r1._width + nSpace;
this["r1" + nIndex]._x = nPosX;
this["r1" + nIndex]._y = nPosy;
}
}
nDepth = nIndex;
for(i = 1;i <= nCharacterCount;i++)
{
nDepth++;
this["c" + i].duplicateMovieClip("c" + nDepth, nDepth);
this["c" + i]._visible = false;
}
r1._visible = false;
function again()
{
gotoAndPlay(2);
}
function fun()
{
for(i = 1;i <= nIndex;i++)
{
tempColor = new Color(this["r1" + i]);
col = random(0xffffff);
tempColor.setRGB(col);
}
if(bIsCharacterChange)
{
for(i = nIndex;i <= nDepth;i++)
{
tempColor = new Color(this["c" + i]);
col = random(0xffffff);
tempColor.setRGB(col);
}
}
}
========== 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 ==========
$"ColorfulFlare(rc).swf"("方塊","絢彩方塊。(您還可以選擇更換其他的資源。)",2);
========== Resource Part End ==========
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -