Starling-animate-cc extension Help


#1

has anyone used this extension?
when i load assets it gives me error like this;
Uncaught SyntaxError: Unexpected token  in JSON at position 0


#2

Is this an extension to Adobe Animate? An extension to Starling in Haxe code? In AS3?

EDIT: Are you loading a JSON file that has a byte-order mark? That might break the haxe.Json parser


#3

Yes I’m talking about this haxe library. https://lib.haxe.org/p/starling-animate-cc/
I just tried to test if it works and was loading its example files, not mine.


#4

I also tried Dragon Bones but it is older version than starling-animate-cc (last update was 1 year ago) and it has many errors


#5

am I doing something wrong?


#6

We should have a pretty new DragonBones port done. The error still might be a “byte order mark”, see if you can open your JSON using a code editor, and remove the mark and re-save the file


#7

I decided to load with openFl loaders then add to AssetsmanagerEX.
it now works but cannot get textures (shows animation with white images)


#8

changed spritemap.json to xml and now it works.
is there any other solutions?


#9

It’s a Haxe JSON parse error, so it might be possible to experiment with changes to the JSON (such as making sure there is no byte-order mark) to see if you can get the Haxe parser to accept it


#10

Perhaps there would be a way for the library to detect if the bytes for the text begins with 0xEF, 0xBB and 0xBF and strip it out if needed


#11

I tried to remove BOM, but it didn’t work, the main problem after when i tried to load with another way, was that textureatlas couldnt be generated properly with json. it coulnt get textures and were only white images, so i used exact same names, width and heights, x and y to generated xml file and it worked