首页

PS教程

PSD素材

PS素材

背景图片

高清图片

字体下载

矢量素材

PS资源

PS作品

会员专区
注册 / 登录
收藏
入门教程照片处理抠图教程调色教程文字特效经典合成鼠绘教程滤镜特效非 主 流GIF 动画签名溶图创意设计
 您当前的位置: PhotoShop资源网 >> PS教程 >> PS教程 >> 创意设计 >> 正文

Flash实例:超强的粒子特效

[ 作者来源:yinggoing 编辑整理:PhotoShop资源网 更新时间: 2007-06-14 录入: 黄叶飞扬 ]

  超强的粒子特效,效果非常好,在此和大家分享:


效果预览

 

 

  #initclip 1
  function PoolClass()
  {
  this.stick = {x: 300, y: 169};
  this.onEnterFrame = this.dragStick;
  } // End of the function
  PoolClass.prototype = new MovieClip();
  PoolClass.prototype.dragStick = function ()
  {
  if (this.stick.x < 0)
  {
  this.stick.vx = this.stick.vx + 4 * Math.random();
  }
  else if (this.stick.x > 600)
  {
  this.stick.vx = this.stick.vx - 4 * Math.random();
  }
  else
  {
  this.stick.vx = this.stick.vx + (Math.random() - Math.random()) * 4;
  } // end else if
  if (this.stick.y < 0)
  {
  this.stick.vy = this.stick.vy + 4 * Math.random();
  }
  else if (this.stick.y > 337)
  {
  this.stick.vy = this.stick.vy - 4 * Math.random();
  }
  else
  {
  this.stick.vy = this.stick.vy + (Math.random() - Math.random()) * 4;
  } // end else if
  this.stick.x = this.stick.x + this.stick.vx;
  this.stick.y = this.stick.y + this.stick.vy;
  this.stick.vx = this.stick.vx * 8.000000E-001;
  this.stick.vy = this.stick.vy * 8.000000E-001;
  this.createNode(random(600), random(337), this.stick.x, this.stick.y, 7 + random(13));
  };
  PoolClass.prototype.createRandomNode = function ()
  {
  var x = random(600);
  var y = random(337);
  var dx = this._xmouse;
  var dy = this._ymouse;
  var ds = 10 + random(20);
  this.createNode(x, y, dx, dy, ds);
  };
  PoolClass.prototype.createNode = function (x, y, dx, dy, ds)
  {
  var nombre = "nd" + String(this.depth++);
  var neo = this.attachMovie("node", nombre, this.depth);
  neo._x = x;
  neo._y = y;
  neo.dx = dx;
  neo.dy = dy;
  neo.body._xscale = ds;
  neo.body._yscale = ds;
  };
  Object.registerClass("pool", PoolClass);
  #endinitclip


下载源文件请点击

 



≡★ 免 责 声 明 ★≡

除本站原创外,本站所提供的所有教程均收集整理自网络,其版权归该教程直原始作者或原始出处所有!

除特别声明外,您可以在保持教程的完整和注明来源的前提下免费复制、转贴本站所提供的所有教程;但是,不可以盗链本站的图片!

除特别声明外,在未经许可的情况下您不得将本站所提供的任何教程(包括资源)用于商业用途;

如果确有需要,请自行与该教程的原始所有权者(即:原始作者或出处)联系,本站不提供相关服务;否则,由此而引发的一切后果由您自负!