Thanks @chrisco! Your post help me find the issue. I had created two CCSpriteBatchNodes but had a copy paste error. I was trying to addChild twice to the same CCSpriteBatchNode. Here is the correct code:
//-----Animation Section
//Cache the sprite frames and texture
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"TextSpreadOne.plist"];
//Create the sprite sheet
CCSpriteBatchNode *spriteBatchNode = [CCSpriteBatchNode batchNodeWithFile:@"TextSpreadOne.png"];
[self addChild:spriteBatchNode];
//Gather the list of frames
NSMutableArray *paragraphAnimFrames = [NSMutableArray array];
for(int i = 1; i <= 51; ++i) {
[paragraphAnimFrames addObject:
[[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:
[NSString stringWithFormat:@"TextSpreadOne-%d.png", i]]];
}
//Create the animation object
CCAnimation *paragraphAnim = [CCAnimation animationWithName:@"walk" delay:0.1f frames:paragraphAnimFrames];
//Create the sprite and run the animation action
CGSize winSize = [CCDirector sharedDirector].winSize;
self.paragraphAnim = [CCSprite spriteWithSpriteFrameName:@"TextSpreadOne-1.png"];
_paragraphAnim.position = ccp(winSize.width/2, winSize.height/2);
self.animateText = [CCRepeatForever actionWithAction:
[CCAnimate actionWithAnimation:paragraphAnim restoreOriginalFrame:NO]];
//[_paragraphAnim runAction:_animateText];
[spriteBatchNode addChild:_paragraphAnim];
//Static sprites section
//Cache the sprite frames and texture
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"Spread02StaticImages.plist"];
//Create the sprite sheet
CCSpriteBatchNode *spriteStaticBatchNode = [CCSpriteBatchNode batchNodeWithFile:@"Spread02StaticImages.png"];
[self addChild:spriteStaticBatchNode];
//add the static items
NSMutableArray *staticImageItems = [NSMutableArray array];
[staticImageItems addObject:
[[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:
[NSString stringWithFormat:@"Spread02ParagraphButton.png"]]];
//Create the sprite
//CGSize winSize = [CCDirector sharedDirector].winSize;
self.paragraphButton = [CCSprite spriteWithSpriteFrameName:@"Spread02ParagraphButton.png"];
_paragraphButton.position = ccp(winSize.width/2, winSize.height/2);
[spriteStaticBatchNode addChild:_paragraphButton];
Here is the incorrect last line:
[spriteBatchNode addChild:_paragraphButton];
When I tried to addChild twice to the same BatchNode I received this error. 'NSInternalInconsistencyException', reason: 'CCSprite is not using the same texture id'
Hope this helps someone in the future.