ANIMATION PROBLEM

Hi,

I have a player, which has different types of animation in different directions.
So i have different png files for different animation.
Is there any way to run animations from different batchnode on a single sprite.

i am getting the following assert

“CCSprite: Batched sprites should use the same texture as the batchnode”

You cannot. Please read the wiki: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Texture_Cache

The CCSpriteBatchNode renders all of its children in one go, in one batched draw call. That's why you need to add sprites to the batch node so it can render them all together. 
Only sprites using the same texture as the batch node can be added to a batch node, because you can only batch draw from the same texture. 
Whenever the engine has to switch from one texture to another, it issues a new draw call.

Terry,

thanks for the very quick reply.
So is there any other way to overcome this problem, or else i will switch my code to normal sprite animation.

The only reason you would use CCSpriteBatchNode is because you want to have a better performance. You could make all your animation into a single spritesheet. Then you could create as many batch node as you need it, or you could use just a single batch node.