2005/09/01 | 画板
类别(flash As) | 评论(0) | 阅读(49) | 发表于 17:01
在第一帧插入AS
iClr = 0xffffff*Math.random(); //随机设定画笔的颜色
iPenSize = (10-1)*Math.random()+1; //随机设定画笔的大小
iPenAlpha = (100-50)*Math.random()+50; //随机设定画笔的透明度
//第2、3行设定随机范围值遵循:(最大值—最小值)*随机数函数+最小值
//Math.random()范围在0到1之间

this.lineStyle(iPenSize, iClr, iPenAlpha); //设定画笔风格
if (x == undefined ¦ ¦ y == undefined) {
x = y=Stage.height*Math.random(); //随机设定画笔的初始位置
}
this.moveTo(x, y); //将画笔移动到上次绘线的终点
x = _xmouse;
y = _ymouse;
this.lineTo(_xmouse, _ymouse);//绘制一条从上次绘线终点到这次鼠标最终停留位置的随机风格直线

在第二帧插入
gotoAndPlay(1);//回第一帧继续画
0

评论Comments

日志分类
首页[193]
flash As[107]
有的没的[59]
数码照片[4]
自由世界[19]
blender[4]