?? 爬行.sqe
字號(hào):
========== Description Part Begin ==========
name = "爬行";
description = "實(shí)例運(yùn)動(dòng)如蟲子爬行一樣。";
version = "1.00";
bin = "crawling.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ù)多。");
$nLength(EDIT,INT,15,1 100,"距離","一個(gè)實(shí)例將要移動(dòng)的距離。");
$nCount(EDIT,INT,3,1 1000,"次數(shù)","實(shí)例要移動(dòng)的次數(shù)。");
$bDirection(LIST,INT,0,"左":0 "右":1,"方向","控制實(shí)例是向左邊移動(dòng),或是向右邊移動(dòng)。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nFrameCount = 10;
nCharacterCount = 4;
nLength = 15;
nCount = 3;
bDirection = 0;
nWhoMove = 1;
nMoveCount = 0;
nMove = 0;
if(bDirection)
nWhoMove = nCharacterCount;
else
nWhoMove = 1;
function left()
{
nMove += 3;
if(nMove > nLength)
{
nMove = 3;
nWhoMove++;
if(nWhoMove > nCharacterCount)
{
nMoveCount ++;
if(nMoveCount >= nCount)
{
bDirection = true;
nMoveCount = 0;
return ;
}
nWhoMove = 1;
}
}
this["c" + nWhoMove]._x -= nMove;
}
function right()
{
nMove += 3;
if(nMove > nLength)
{
nMove = 3;
nWhoMove--;
if(nWhoMove < 1)
{
nMoveCount ++;
if(nMoveCount >= nCount)
{
bDirection = false;
nMoveCount = 0;
return ;
}
nWhoMove = nCharacterCount;
}
}
this["c" + nWhoMove]._x += nMove;
}
function again()
{
gotoAndPlay(2);
}
function fun()
{
if(bDirection)
{
right();
}
else
{
left();
}
}
========== Function Part End ==========
========== Frame Part Begin ==========
$frame(fun,1,-1,"fun");
$frame(fun,2,-1,"fun");
$frame(again,3,-1,"again");
========== Frame Part End ==========
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -