CCParticleSystem from file example

Could someone provide an example for loading a particle system from file. I tried the following but it did not work. The app crashes with this code:

CCParticleSystem* effect = CCParticleSystem::particleWithFile(“myeffect.plist”);
effect~~>setPosition );
this~~>addChild(effect, 3);

CCParticleSystemQuad *system = new CCParticleSystemQuad();
system~~>initWithFile;
this~~>addChild(system, 3);

also doesn’t work

AFAIK, cocos2d-x can’t support plist in binary format, it’s a known bug. They use libxml to parse plist file instead of CoreFoundation.
issue #349 and this post http://www.cocos2d-x.org/boards/7/topics/489?r=540#message-540 may help you.

Thank you for your help. I made it so the image binary is not included in the plist file.

In Particle Designer, I unchecked “Embed Texture” and now the code works.

CCParticleSystem *system = new CCParticleSystemQuad();
system~~>initWithFile;
this~~>addChild(system, 10);
system->setPosition(ccp(size.width/2, size.height/2));

oh, thanks. I forget this problem.
Some embed texture can work and some are failed at the phase png loading, it’s an old bug. But I don’t know why.
So you can see in the cocos2d-x tests, I unpack the SpinningPeas.png and SpookyPeas.png out of plist file.