Hi there 
how can i add a button listener in a cc.Button through code?..
need it because I have separate UI’s for mobile and web thanks
button.clickEvents.push(new cc.Component.EventHandler(...))
EventHandler:
http://www.cocos.com/docs/creator/api/classes/Component.EventHandler.html
These information may help you.
2 Likes