沫儿第一次发教程,大家多多支持哦!
效果图:http://up.awqq.net/up/20081025113921_沫-1.swf
1.打开Flash,新建文档,导入第一张图片,设置属性大小,使图片相对与舞台居中对齐!(两张图片大小要一致)
2.新建图层2,导入第二张图片,使其居中对齐!
3.右键点击第二张图片,转换为元件,转换为影片剪辑!
5.新建图层3,按F9,在动作面版里输入以下脚本
var blur = new flash.filters.BlurFilter(10, 10, 2);
_root.createEmptyMovieClip("square",2);
_root.pic.setMask(square);
_root.square.filters = [blur];
pic.cacheAsBitmap = true;
onMouseMove = function ()
{
square.drawCircle(_xmouse, _ymouse, 30);
updateAfterEvent();
};
MovieClip.prototype.drawCircle = function (x, y, r)
{
this.moveTo(x + r, y);
this.beginFill(136);
this.curveTo(r + x, 4.142000E-001 * r + y, 7.071000E-001 * r + x, 7.071000E-001 * r + y);
this.curveTo(4.142000E-001 * r + x, r + y, x, r + y);
this.curveTo(-4.142000E-001 * r + x, r + y, -7.071000E-001 * r + x, 7.071000E-001 * r + y);
this.curveTo(-r + x, 4.142000E-001 * r + y, -r + x, y);
this.curveTo(-r + x, -4.142000E-001 * r + y, -7.071000E-001 * r + x, -7.071000E-001 * r + y);
this.curveTo(-4.142000E-001 * r + x, -r + y, x, -r + y);
this.curveTo(4.142000E-001 * r + x, -r + y, 7.071000E-001 * r + x, -7.071000E-001 * r + y);
this.curveTo(r + x, -4.142000E-001 * r + y, r + x, y);
this.endFill();
};
注:此教程适合新手哦!
莫) ̄离 (314745007) 于 2008-10-25 10:38:04 对此贴进行了编辑
莫) ̄离 (314745007) 于 2008-10-25 10:39:32 对此贴进行了编辑
莫) ̄离 (314745007) 于 2008-10-25 10:42:15 对此贴进行了编辑




选择表情