Q:

how to use .csb file after published project from cocostudio

I have created a UI for my game.
after published project from cocostudio I have got .csb file.
how to use it in my game?

A:

Add the header file

#include"cocostudio.h"
Node* node = CSLoader::createNode("background.csb");
this->addChild(node);

//get animation data

cocostudio::timeline::ActionTimeline* action = CSLoader::createTimeline("background.csb");

node->runAction(action);

action->gotoFrameAndPlay(0, true);

it will be helpful for you

A:

Example with js:
    var node = ccs.csLoader.createNode("res/node.csb");
    var node_action = ccs.actionTimelineCache.createAction("res/node.csb");
    node.runAction(node_action);
    node.attr({
        scale: 0.6,
        x: 130,
        y: 10,
    })
    node_action.gotoFrameAndPlay(0, 40, true);
    this.addChild(node);    

