1
\$\begingroup\$

Here is the JavaScript code:

var size = cc.winSize;
ccs.ArmatureDataManager.getInstance().addArmatureFileInfo(res.skeleton);
// 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;
this.addChild(armature);

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?

\$\endgroup\$
  • \$\begingroup\$ 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! \$\endgroup\$ – Dannel.wu Nov 13 '15 at 2:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.