ccui is not defined

ccui is not defined

Postby BenChang » Sun Sep 13, 2015 9:57 pm

Problem: you try to use UI widgets such as ccui.TextField, but get an error that ccui is not defined

Solution: in projects.json add the "extensions" to the list of modules that Cocos will load

For example:
Code: Select all
{
    "project_type": "javascript",

    "debugMode" : 1,
    "showFPS" : false,
    "frameRate" : 60,
    "id" : "gameCanvas",
    "renderMode" : 0,
    "engineDir":"frameworks/cocos2d-html5",

    "modules" : ["cocos2d","extensions"],

    "jsList" : [
        "src/resource.js",
        "src/app.js",
        "src/Urchin.js",
        "src/Squid.js",
        "src/Gem.js",
        "src/UI.js"
    ]
}

User avatar
BenChang
 
Posts: 176
Joined: Mon Jan 17, 2011 4:48 pm

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron