您现在的位置: 像素吧 >> 设计教程 >> Flash教程 >> 正文

颤抖广告动画

来源:网络 日期:2008-8-5 21:12:51 作者:赛特迪彩 查看:
"颤抖广告动画"这篇Flash教程如果帮助了您,请记得分享给您身边的朋友,如果您有比"颤抖广告动画"更好的教程请发布共享,帮助别人快乐自己!
  

先看看效果:(最后附有源文件)
http://www2.flash8.net/UploadTeach/200807/20080724153947903.swf

主要代码:

onClipEvent (load)
{
    var vx = 0;
    var vy = 0;
}
onClipEvent (enterFrame)
{
    spring = 3.000000E-001;
    damp = 8.000000E-001;
    this.vx = this.vx + (_root.tracker._x - this._x) * spring;
    this.vy = this.vy + (_root.tracker._y - this._y) * spring;
    this.vx = this.vx * damp;
    this.vy = this.vy * damp;
    this._x = this._x + this.vx;
    this._y = this._y + this.vy;
    _root.mc3._width = _root.mc3._x - this._x;
    _root.mc3._height = _root.mc3._y - this._y;
    _root.mc4._width = this._x - _root.mc4._x;
    _root.mc4._height = _root.mc4._y - this._y;
    _root.mc1._width = this._x - _root.mc1._x;
    _root.mc1._height = this._y - _root.mc1._y;
    _root.mc2._width = _root.mc2._x - this._x;
    _root.mc2._height = this._y - _root.mc2._y;
}
源文件: newadf001-luntan.rar

相关评论:

发表评论

  • 昵 称:
  • 内 容:
  •  
  • 虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号!