java script demo for cocos2d engine