flash素材、flash片头、flash特效、flash源码,flash相册等flash资源都是本站的重要flash素材请大家支持新丁flash素材网!
首页 | 片头欣赏 | Banner 欣赏 | Flash 特效 | 网站欣赏 | 黄色笑话 | 技术文档 | 视频教程 | 网页模板 | flash小游戏 | 源码下载 | 相关下载 | 声音下载 |
flash Action应用 您当前的位置是:首页 >> 技术文档 >> flash Action应用 >> 详细内容
小技巧:纯AS的运动模糊效果
加入时间:2007-9-27 浏览:36 录入:启能Flash资源网 来源:网络
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;
  }
 };
}
关于我们 | 联系方式 | 广告赞助 | 免责声明 | 站点留言 | 友情链接 | 推荐站点
Copyright 2007-2008 新丁flash资源(flash素材)网 All Rights Reserved
新丁flash资源(flash素材)网 保留所有权利 未经许可请勿任意转载或复制使用 
请使用1024*768分辨率浏览本站以达到浏览新丁flash资源(flash素材)网的最佳视觉效果
新丁flash资源(flash素材)网中所有的解压密码均为:www.qnflash.com
粤ICP备08010396号