lp43
September 3, 2013, 7:00am
#1
Hi cocos2d-html5 team,
I encountered a problem that I set Callbacks in cocosBuilder 3.0 timeline,
It doesn’t call callback-method I declared.
Please check out this problem, Thanks.
cocos2d-html5 2.1.4
cocosBuilder3.0 alpha
A node add B node,
B node set a Callbacks on Timeline,
A node can’t get the Callback on web but devices can.
螢幕快照 2013-09-03 下午2.58.10.png (25.6 KB)
螢幕快照 2013-09-03 下午3.12.47.png (50.3 KB)
Hi Simon,
Could you please show your codes that how to register callbacks on cocos2d-html5?
Is it use jsControlled to handle callback?
We have some samples that how to handle callbacks with jsControlled on Cocos2d-html5 at https://github.com/cocos2d/cocos2d-js-tests/tree/master/tests/ExtensionsTest/CocosBuilderTest
Best regards
David
lp43
September 10, 2013, 3:28am
#3
Dingping Lv wrote:
Hi Simon,
>
Could you please show your codes that how to register callbacks on cocos2d-html5?
>
Is it use jsControlled to handle callback?
>
We have some samples that how to handle callbacks with jsControlled on Cocos2d-html5 at https://github.com/cocos2d/cocos2d-js-tests/tree/master/tests/ExtensionsTest/CocosBuilderTest
>
Best regards
David
Hi Dingping,
my code as below:
var CardScene2 = function(){
this.onDidLoadFromCCB = function(){
cc.log("into CardScene2 onDidLoadFromCCB");
//繪製tableView
var winSize = cc.Director.getInstance().getWinSize();
tableView = cc.TableView.create(this, cc.size(CELL_WIDTH*3, CELL_HEIGHT));
tableView.setDirection(cc.SCROLLVIEW_DIRECTION_HORIZONTAL);
tableView.setPosition(cc.p((winSize.width/2-(CELL_WIDTH*3)/2+10), winSize.height/2-50));
tableView.setDelegate(this);
this.basenode.addChild(tableView,10);
tableView.reloadData();
tableView.setContentOffset(cc.p(-CELL_WIDTH*3,0));
};
this.onStartAnimationFinished = function(){//no response on cocos2d-html5, but normal in IOS/Android by cocos2dx-JSB
cc.log("into CardScene2 onStartAnimationFinished");
tableView.setContentOffsetInDuration(cc.p(0,0),0.3);
};
};
And my cocosBuilder set as attachement.
Thanks!
Hi Simon,
I think your configuration is right, maybe there are some reasons to make it doesn’t work:
CocosBuilder has cached result of ccb file, please click the “clean cache”, then click the “publish”, and try again.
The version of Cocos2d-html5 is older, please pull the latest “develop” branch from https://github.com/cocos2d/cocos2d-html5
Best regards
David
lp43
September 10, 2013, 8:27am
#5
Dingping Lv wrote:
Hi Simon,
>
I think your configuration is right, maybe there are some reasons to make it doesn’t work:
>
CocosBuilder has cached result of ccb file, please click the “clean cache”, then click the “publish”, and try again.
The version of Cocos2d-html5 is older, please pull the latest “develop” branch from https://github.com/cocos2d/cocos2d-html5
>
Best regards
David
Did the action you said as above,
but the result still is the same.
Do I need to send code to you?
Simon
SoHo
April 7, 2014, 10:22am
#6
Hi Guys
Has there been updates on this issue yet, for me its also just working on android and IOS, but not on web.
Thanks
@lp43
Can you pls upload the binary of CocosBuilder?
I’m unable to get it from the site(since it is closed) and xcode compilation of github CocosBuilder project failed.