小技巧:純AS的運動模糊效果_Flash教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:仿央視網(wǎng)Flash動態(tài)導(dǎo)航菜單分析:該效果主要是利用在按鈕的OVER(經(jīng)過)幀中放入MovieClip(影片剪輯MC)來實現(xiàn)的,主要效果的實現(xiàn)都是在MC中實現(xiàn)的,利用了遮罩、淡入,移動等動畫
import flash.filters.*;var blur:BlurFilter = new BlurFilter(blurX, blurY, 1);
var num = 10;
for (var i = 0; i<num; i ) {
scale = random(300);
alpha = random(10000/scale) 30;
var temp_mc = _root.createEmptyMovieClip("ball" i, this.getNextHighestDepth());
temp_mc.createTextField("my_txt", 1, 0, 0, 300, 100);
temp_mc.my_txt.multiline = true;
temp_mc.my_txt.wordWrap = true;
temp_mc.my_txt.text = "WWW.3C800.COM";
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFF6600;
my_fmt.size = 20;
my_fmt.font = "BM bug";
temp_mc.my_txt.setTextFormat(my_fmt);
with (temp_mc) {
_x = random(Stage.width);
_y = random(Stage.height);
_xscale = scale;
_yscale = scale;
_alpha = alpha;
}
temp_mc.onEnterFrame = function() {
Yspeed = (Stage.height/2-_ymouse)/this._yscale*12;
Xspeed = (Stage.width/2-_xmouse)/this._xscale*12;
blur.blurX = Math.abs(Xspeed);
blur.blurY = Math.abs(Yspeed);
this.filters = [blur];
this._y = Yspeed;
if (this._y>Stage.height) {
this._y = 0;
}
if (this._y<0) {
this._y = Stage.height;
}
this._x = Xspeed;
if (this._x>Stage.width) {
this._x = 0;
}
if (this._x<0) {
this._x = Stage.width;
}
};
}
分享:Flash中的鼠標(biāo)繪畫技巧該篇主要講述了如何使用鼠標(biāo)繪制人的臉形,看著網(wǎng)上那么多繽紛多彩的Flash,相信很多朋友都有想自己親手制作動畫片的愿望。但我們中的大多數(shù)人并沒有學(xué)過繪畫,
/所屬分類:Flash教程/更新時間:2008-03-05
相關(guān)Flash教程:
- 相關(guān)鏈接:
- 教程說明:
Flash教程-小技巧:純AS的運動模糊效果
。