egret wing custom event

Send a custom event, event name ClickWord.

the this .dispatchEvent ( new new egret.Event ( " ClickWord " , false , false , the this ));      // send custom events

Receiving a custom event ClickWord, perform the function of the arrow.

the this .addEventListener ( " ClickWord " , () => {}, the this );     // accept the custom event

 

Guess you like

Origin www.cnblogs.com/wuxingJS/p/10981306.html