Flash脚本高手请进

来源:百度知道 编辑:UC知道 时间:2024/05/31 06:23:32
请高手分析下这段代码,解决问题后再追加分数.
static function initialize(target)
{
var _loc2 = MovieClip.prototype;
if (target instanceof MovieClip)
{
_loc2 = target;
} // end if
if (_loc2.moveOut != null)
{
return (false);
} // end if
var _loc3 = _global.com.idescn.utils.MCmoveInOut.prototype;
_loc2.moveIn = _loc3.moveIn;
_loc2.moveOut = _loc3.moveOut;
_global.ASSetPropFlags(_loc2, ["moveIn", "moveOut"], 5);
return (true);
} // End of the function
function moveIn(frame, func)
{
if (frame > _totalframes || frame == undefined)
{
frame = _totalframes;
} // end if
if (frame < _currentframe)
{
func(this);
}
else
{
function onEnterFrame()
{
if (_currentframe < frame)
{
this.nextFrame();
}
else
{
delete this.onEnterFrame;
func(this);
} // end else if

代码不全吧?

分少啊

//静态函数 传递变量那种的
static function initialize(target)
{
//定义_loc2为MC的属性
var _loc2 = MovieClip.prototype;
//传递是是不是在MC中
if (target instanceof MovieClip)
{
//赋值
_loc2 = target;
} // end if
if (_loc2.moveOut != null)
{
return (false);
} // end if

//赋值
var _loc3 = _global.com.idescn.utils.MCmoveInOut.prototype;
_loc2.moveIn = _loc3.moveIn;
_loc2.moveOut = _loc3.moveOut;
//调用函数
_global.ASSetPropFlags(_loc2, ["moveIn", "moveOut"], 5);
return (true);
} // End of the function
//定义函数
function moveIn(frame, func)
{
//针数大于总针数或者为空
if (frame > _totalframes || frame == undefined)
{
//赋值
frame = _totalframes;
} // end if

//小于当前
if (frame < _currentframe)
{
//调用函数
func(this);
}
else
{
function onEnterFrame()