Read a plist?

Read a plist?
0.0 0



I’m trying to read a plist file with CC2Dx-HTML5. I’ve seen that CCSpriteFrameCache .addSpriteFrames method begins with:
var dict = cc.FileUtils.getInstance().dictionaryWithContentsOfFileThreadSafe(plist);

where “plist” is actually named “fileName” is CCFileUtils .dictionaryWithContentsOfFileThreadSafe method.

The plist was created in XCode and works fine in Cocos2D-iOS; However, HTML5 version logs “cocos2d:Not a plist file”.
What’s the best way to load a plist file please?


Hi Jem,
Did you preload the plist file?
And did you set search path by cc.FileUtils.setSearchPaths?


Hi Dingping Lv,

Ineed, it was a search path issue. Thank you!


We have created a PLIST read video PLIST Video Tutorial