载入中...
 
     
 
载入中...
时 间 记 忆
载入中...
最 新 评 论
载入中...
专 题 分 类
载入中...
最 新 日 志
载入中...
最 新 留 言
载入中...
搜 索
用 户 登 录
载入中...
友 情 连 接
博 客 信 息
载入中...


 
 
载入中...
   
 
 
flash模糊滤镜的运用
[ 2008-4-12 8:57:00 | By: 周杰伦 ]
 

主要代码:

myBlurdata = new flash.filters.BlurFilter(0, 0, 5);
var myFilters:Array = movieMC.filters;
myFilters.push(myBlurdata);
speed = 0.5;
titlemc.onPress = () {
 dragmc = true;
 Mouse.hide();
 movieMC.attachMovie("mouse_movie", "mouse_movie", 1000000);
 movieMC.mouse_movie._x = this._xmouse;
 movieMC.mouse_movie._y = this._ymouse;
 movieMC._alpha = 50;
 startDrag(this);
 startDragMC();
};
titlemc.onRelease = () {
 dragmc = false;
 Mouse.show();
 movieMC.mouse_movie.removeMovieClip();
 movieMC._alpha = 100;
 stopDrag();
};
startDragMC() {
 movieMC.onEnter = () {
  this._x += (titlemc._x-this._x)*speed;
  this._y += (titlemc._y-this._y)*speed;
  myFilters[0].blurX = Math.abs(Math.floor(titlemc._x-this._x));
  myFilters[0].blurY = Math.abs(Math.floor(titlemc._y-this._y));
  if (Math.abs(titlemc._x-this._x)<1 && dragmc == false) {
   this._x = titlemc._x;
   this._y = titlemc._y;
   myFilters[0].blurY = 0;
   myFilters[0].blurX = 0;
   delete this.onEnter;
  }
  this.filters = myFilters;
 };
}

 
 
  • 标签:flash 
  • 发表评论:
    载入中...
     
         
       
         
    Powered by Oblog.