[close it]Adding spine dynamically in cocos creator

[close it]Adding spine dynamically in cocos creator
0
#1

I want to add spine to my scene dynamically , I tried below code

var self = this;
var url = "spine";
cc.loader.loadRes(url, sp.Skeleton, function (err, Skeletons) {
console.log(err);
var node = new cc.Node("myspine");
var sprite = node.addComponent(sp.Skeleton);
sprite.spine = Skeletons;
node.parent = self.node
console.log(Skeletons);
});

What is the procedure to add spine in my scene.I did not not find any code online.Example project is using addcomponent.

#2

how can you resolved it? i want know that too.