# Error with Cocos2d-JS when using Skeletal animation from Cocos Studio

Here is the JavaScript code：

var size = cc.winSize;
// The error comes from the following line
var armature = ccs.Armature.create("Skeleton");
armature.getAnimation().play("hit");
armature.x = size.width / 2;
armature.y = size.height / 2;


And at runtime I get this error：

Assert failed: AnimationData not exist!

I know that error is from the specified line, but I'm very confused as to how I can solve it.

I have tried many different methods, but unfortunately those didn't work.

In the resources, I load all the image files and JSON files which made by Cocos Studio, and the file path and name are correct.

What could be causing this error?

• I don't know since that I have tried many methods such as made another Skeletal animation ,look it up in the reference book and searching on the net.It might be that something is missing when creating JSON files and resources,but I 'm not sure.So I wonder if there is someone talent can help me,thx! – Dannel.wu Nov 13 '15 at 2:29