📄 书写.sqe
字号:
========== Description Part Begin ==========
name = "书写";
description = "模仿用笔写字的动作。(点击鼠标左键可看到效果)";
version = "1.00";
bin = "Write.bin";
========== Description Part End ==========
========== Parameter Part Begin ==========
$nCharacterCount(EDIT,INT,1,1 10000,"实例总数","指的是使用了该特效的实例的总数。这个值是由影片里所选中的实例数决定的,在这里不能设置。");
$nFrameCount(EDIT,INT,3,3 3,"总帧数","指的是含有动作代码的总帧数。特效播放的总帧数可能比动作代码的帧数多。");
$nScaleSpeed(EDIT,INT,10,1 100,"缩放速度","实例的缩放速度。");
$nAlphaSpeed(EDIT,INT,5,1 100,"透明度变化速度","实例的透明度变化速度。");
$nPenWidth(EDIT,INT,40,1 10000,"宽","笔的宽度。");
$nPenHeight(EDIT,INT,170,1 10000,"高","笔的高度。");
========== Parameter Part End ==========
========== Function Part Begin ==========
nCharacterCount = 4;
nFrameCount = 2;
nScaleSpeed = 10;
nAlphaSpeed = 5;
nPenWidth = 30;
nPenHeight = 105;
r1._width = nPenWidth;
r1._height = nPenHeight;
startDrag(r1,true);
Mouse.hide();
nWho = 0;
nBegin = 1;
nEnd = 0;
for(i = 1;i <= nCharacterCount;i++)
{
this["c" + i]._visible = false;
this["c" + i]._xscale = 0;
this["c" + i]._yscale = 0;
this["c" + i]._alpha = 0;
}
function fun()
{
for(i = nBegin;i <= nEnd;i++)
{
this["c" + i]._visible = true;
this["c" + i]._xscale += nScaleSpeed;
this["c" + i]._yscale += nScaleSpeed;
if(this["c" + i]._xscale > 100)
{
this["c" + i]._xscale = 100;
this["c" + i]._yscale = 100;
}
this["c" + i]._alpha += nAlphaSpeed;
if(this["c" + i]._alpha > 100)
nBegin++;
}
for(i = 1;i < nBegin;i++)
{
if(this["c" + i]._alpha <= 0)
{
this["c" + i].removeMovieClip();
continue;
}
this["c" + i]._alpha -= nAlphaSpeed;
}
}
function OnMouseDown()
{
r1.play();
nWho++;
nEnd++;
if(nWho > nCharacterCount)
nWho = 1;
this["c" + nWho].duplicateMovieClip("c" + nEnd,nEnd);
this["c" + nEnd]._x = _xmouse;
this["c" + nEnd]._y = _ymouse;
this["c" + nEnd]._xscale = 0;
this["c" + nEnd]._yscale = 0;
this["c" + nEnd]._alpha = 0;
}
function again()
{
gotoAndPlay(2);
}
this.onMouseDown = OnMouseDown;
========== 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 ==========
$"write(rc).swf"("笔","可替换类似的资源。",2);
========== Resource Part End ==========
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -