var spriteCache = cc.spriteFrameCache;
spriteCache.addSpriteFrames(res.fireworks_plist,res.fireworks_png);
var sp=cc.Sprite.create();
sp.setPosition(cc.p(size.width*0.75,size.height*0.9));
//使用SpriteBatchNode可以让反复加载帧时只渲染一次,只从内存中取出
var spriteBatchNode= cc.SpriteBatchNode.create(res.fireworks_png);
spriteBatchNode.addChild(sp);
this.addChild(spriteBatchNode);

var animFrames = [];
var str = "";
for (var i = 0; i < 8; i++) {
str = "Effects/fireworks_0000" + (i).toString()+".png";
var frame = spriteCache.getSpriteFrame(str);
animFrames.push(frame);
}
var animation = new cc.Animation(animFrames, 1/30);
sp.runAction(cc.animate(animation).repeatForever());