Cc.MenuItemSprite can't be created with a cc.LayerColor

Hi, I come from the Obj-c and C*+ version of cocos2d, so maybe I’m doing something wrong, I’ve done this before in C*+ for example, where I create a CCMenuItemSprite with two CCLayerColor, so I can create a rectangle coloured button. This is cos the constructor of CCMenuItemSprite accepts a CCNode. This on cocos2d-x with C++.

I’m trying to do the same with javascript, but I get an error:

[Error] TypeError: 'undefined' is not a function (evaluating 'normalImage.textureLoaded()')
    setNormalImage (CCMenuItem.js, line 633)
    initWithNormalSprite (CCMenuItem.js, line 719)
    create (CCMenuItem.js, line 892)
    init (MainMenu.js, line 16)
    (anonymous function) (CCClass.js, line 136)
    onEnter (MainMenu.js, line 76)
    (anonymous function) (CCClass.js, line 136)
    onEnter (CCTransition.js, line 127)
    onEnter (CCTransition.js, line 1233)
    setNextScene (CCDirector.js, line 738)
    drawScene (CCDirector.js, line 346)
    mainLoop (CCDirector.js, line 1227)
    callback (CCApplication.js, line 374)

The code I am using:

var normal1 = cc.LayerColor.create(cc.c4b(255, 0, 0, 255), size.width, 100);
var selected1 = cc.LayerColor.create(cc.c4b(128, 0, 0, 255), size.width, 100);
var item1 = cc.MenuItemSprite.create(normal1, selected1, this.onItem1, this);

So does it mean that with the js binding we cannot create a menu item with a coloured layer?

Any help appreciated.

Hi,Jose Gomez.
This is a bug on cocos2d-html5. I have fixed it at:
[[https://github.com/cocos2d/cocos2d-html5/pull/1323]]
Thanks feedback.

Great thanks