actionscript实现标明菜单
代码如下:
--------------------------------------------------------------
target_x=menu_mc1._x;
vx=0;
for(i=1;i<=4;i++){
_root["menu_mc"+i].onRollOver=function(){
_root.target_x=this._x;
//trace(target_x);
}
}
mc.onEnterFrame=function(){
//var vx=0 ;
vx=(_root.target_x-this._x)/3+vx*0.6;
trace(vx);
this._x+=vx;
}
--------------------------------------------------------------
代码如下:
--------------------------------------------------------------
target_x=menu_mc1._x;
vx=0;
for(i=1;i<=4;i++){
_root["menu_mc"+i].onRollOver=function(){
_root.target_x=this._x;
//trace(target_x);
}
}
mc.onEnterFrame=function(){
//var vx=0 ;
vx=(_root.target_x-this._x)/3+vx*0.6;
trace(vx);
this._x+=vx;
}
--------------------------------------------------------------
回复Comments
作者:
{commentrecontent}