depth=15
speed=0.02
MovieClip.prototype.smoothMove = function (speed, targetx, targety) {
this._x += speed*(targetx-this._x);
this._y += speed*(targety-this._y);
};
MovieClip.prototype.rotateTo = function (targetx, targety) {
var diffX = targetx-this._x;
var diffY = targety-this._y;
this._rotation = Math.atan2 (diffY, diffX)*180/Math.PI;
};
_root.fly_mc.onEnterFrame = function () {
this.smoothMove (speed, _root._xmouse, _root._ymouse);
this.rotateTo (_root._xmouse, _root._ymouse);
};
_root.shadow_mc.onEnterFrame = function () {
this.smoothMove (speed, _root._xmouse, _root._ymouse+depth);
this.rotateTo (_root._xmouse, _root._ymouse+depth);
};
Home
<embed sre=http://bf2.wodemo.com/down/20130709/171612/www.51xflash.com_15624.swf> 软件 图片 铃声 主题 电子书 压缩包
Subscribe |
Register |
Login
| N