网站建设热线:

028-65585480  65585490
点击这里给我发消息点击这里给我发消息点击这里给我发消息点击这里给我发消息

颤抖广告flash动画教程

发布者:admin  来源:  发布时间:2009-12-22  阅读:1981次

主要代码:
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;
}