请教flash动画中的数学问题,很有难度。

代码如下:
stop ();
function chg_bn()
{
for (i = 1; i < _root.bn_loop; i++)
{
eval("_root.bt_" + i).over = 0;
} // end of for
++_root.temp_bn_num;
_root.dong = temp_bn_num;
if (temp_bn_num >= _root.bn_loop)
{
temp_bn_num = 1;
} // end if
eval("_root.bt_" + temp_bn_num).over = 1;
} // End of the function
function Interval()
{
_root.clear_bn = setInterval(chg_bn, 5000);
} // End of the function
Stage.showMenu = false;
var bn_width = 480;
var temp_bn_num = 1;
_root.load_tot.onEnterFrame = function ()
{
var _loc3 = -(_root.temp_bn_num - 4) * bn_width;
mov_x = _loc3 - this._x;
this._x = this._x + mov_x * 2.345432E-001;
};
trace (_root.bn_loop);
if (_root.bn_loop > 2)
{
Interval();
} // end if
主要是这段代码搞不懂:
_root.load_tot.onEnterFrame = function ()
{
var _loc3 = -(_root.temp_bn_num - 4) * bn_width;
mov_x = _loc3 - this._x;
this._x = this._x + mov_x * 2.345432E-001;
};
这里面的数学问题始终搞不懂,请教高手!

缓动系数:
公式是
de=0.3
dist=d1-d2
vx=dist*de
当前位移=(目标点距离-当前距离)*缓动系数
要在EnterFrame里执行此公式才会平滑的一出效果。
温馨提示:答案为网友推荐,仅供参考
相似回答