import mx.utils.Delegate; nowWordSound.onSoundComplete =Delegate.create(this, playOver); function playOver():Void{ }
缺点:无法获取触发事件的对象
onMouseDownEvent(clickObj, clickHdl, this); function onMouseDownEvent(__useObj:Object,__callerFun:Function,__callerObj:Object){ __useObj.onMouseDown = function(){ __callerFun.call(__callerObj,this); }; } function clickHdl(targetObj) { }
缺点:非原生指向,相对Delegate 稍慢
优点:可以获取触发事件的对象
鼠标事件包含:
相当于as3的click: onRelease
相当于as3的down: onPress
全局性的:onMouseUp onMouseDown
鼠标移动:onMouseMove
ef: onEnterFrame
不太了解这个:onReleaseOutside