📄 cfdelegate.as
字号:
/*
@Description: 在指定范围内运行函数.原类:mx.utils.Delegate;
@usage: CFDelegate.create(要运行函数的范围, 函数);
@example:
//运行在主时间轴.
import AS2.utils.CFDelegate;
mc.onRelease = _release; //output: _level0.mc
mc.onRelease = EventDelegate.create(this, _release); //output: _level0
funcion _release():Void
{
trace(this);
}
//
@author: ChooseFlash 修改
@date: 2007-07-07
*/
class AS2.utils.CFDelegate
{
public static function create(scope:Object, method:Function):Function
{
var f:Function = function ()
{
method.apply(scope, arguments);
};
return f;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -