| 代码: |
static function create(obj:Object, func:Function):Function |
| 代码: |
import mx.utils.Delegate; var md = Delegate.create(this, someFunction); myBtn.addEventListener('click',md); //其它动作 //然后移除 myBtn.removeEventListener('click',md); |
| 代码: |
import mx.utils.Delegate; function xmlLoaded(success) { trace(this); trace(success); } function handleEnterFrame() { trace(this); trace(getTimer()); } var myXML = new XML(); myXML.onLoad = Delegate.create(this, xmlLoaded); myXML.load(“some.xml”); //myMc为当前帧上一个影片剪辑 myMC.onEnterFrame = Delegate.create(this, handleEnterFrame); |
| 代码: |
import mx.utils.Delegate; function traceThis() { trace(this); } var myInt = setInterval(Delegate.create(this, traceThis), 1000); |
评论加载中…
![]() |