Hi,
I want to pass an argument to a MenuItemSprite function.
I’m setting the tag, but I’m not getting the expected result.
So I must be getting it wrong. Maybe I should not use this.tag there?
Don’t know how to get the sender in js.
I post my code. Thanks in advance.
var bufItem = new cc.MenuItemSprite(
new cc.Sprite(res.bt_empty_normal_png),
new cc.Sprite(res.bt_empty_hover_png),
new cc.Sprite(res.bt_locked_png),
function () {
cc.log("tag:"+this.tag);
},
this);
bufItem.setTag(9);
