颤抖广告动画
作者:赛特迪彩 类型:原创 来源:闪吧
先看看效果:(最后附有源文件)
主要代码:
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;
}
源文件:{
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
责任编辑:silvia 时间:2008年7月24日
- 上一篇:
- Maya制作树蝶美女图难点解析
- 没有相关教材
- 最近更新
