Hi, I’ve been investigating the use of CocoStudio lately, and looking at the samples I’ve found that using the widgets by code can be quite usefull.
So I’ve started copying from “UIScrollViewTest.js”, but I’m having an error: whenever I try to access the
ccs object (for example, doing
this._uiLayer = ccs.UILater.create();) I get a “ReferenceError: ccs is not defined” error in that line.
Can anybody help me? Do I have to add some configuration to my “cocos2d.js” or “main.js” files in order to be able to use CocoStudio’s classes? I’m I missing something else? I’m using latest version from github (I get the same error if I try to use v2.2.2).
I’m really sad, since I was planning on devoting today to get scrolling working for my TMX manager class, but I can’t even get this to work .
PS: yes, I am loading the game from a webserver, and I still get the same error.
edit: d’oh! I had
loadExtension:false instead of
loadExtension:true in my “cocos2d.js” file.
edit2: in the end, I could not get UIScrollView as I wanted, the tests aren’t as modular and independent enough for me to understand how to make a minimal implementation. So it turned out to be simpler to just add a scroll method manually to my tmx layer.