Özer Gül

Cocos Creator button touch listener (javascript)

2016 06 15 Javascript, Mobil

Hi, today I am sharing cocos creator touch listener method. In creator, there is node.on() method to handle events.

/* button */
var button = cc.find("Canvas/Button")

if(button) {
    button.on(cc.Node.EventType.TOUCH_START, function () {
        // your codes.
    }, button)
}

2 responses to “Cocos Creator button touch listener (javascript)”

  1. w16 says:

    Thanks for this post 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

(c) Özer Gül, css framework w3.css