How do I make an Animation?

I don’t understand how to make an animation work. Can someone show me how to do it? I’ve made the template for my game.

I looked at the spritesheet animation tutorial, but I don’t understand how to do it. I looked at the GROSSINI tutorial but I don’t understand it. The web tutorials are poorly formatted so it makes it hard for me to understand what’s going on and what I need to do.

All all the youtube tutorials are using old deprecated code.

Can someone show me an example and show me the code?

Spriteshee animation is made easy.

You can study this …(for 3.x)
http://www.cocos2d-x.org/wiki/Sprite_Sheet_Animation

This is the sample for 2.x

CCTexture2D *texture = CCTextureCache::sharedTextureCache()->addImage("animations/dragon_animation.png");

// manually add frames to the frame cache
CCSpriteFrame *frame0 = CCSpriteFrame::createWithTexture(texture, CCRectMake(132*0, 132*0, 132, 132));
CCSpriteFrame *frame1 = CCSpriteFrame::createWithTexture(texture, CCRectMake(132*1, 132*0, 132, 132));
CCSpriteFrame *frame2 = CCSpriteFrame::createWithTexture(texture, CCRectMake(132*2, 132*0, 132, 132));
CCSpriteFrame *frame3 = CCSpriteFrame::createWithTexture(texture, CCRectMake(132*3, 132*0, 132, 132));
CCSpriteFrame *frame4 = CCSpriteFrame::createWithTexture(texture, CCRectMake(132*0, 132*1, 132, 132));
CCSpriteFrame *frame5 = CCSpriteFrame::createWithTexture(texture, CCRectMake(132*1, 132*1, 132, 132));


//
// Animation using Sprite BatchNode
//
CCSprite* sprite = CCSprite::createWithSpriteFrame(frame0);
sprite->setPosition( ccp( s.width/2-80, s.height/2) );
addChild(sprite);
        
CCArray* animFrames = CCArray::createWithCapacity(6);
animFrames->addObject(frame0);
animFrames->addObject(frame1);
animFrames->addObject(frame2);
animFrames->addObject(frame3);
animFrames->addObject(frame4);
animFrames->addObject(frame5);

Im using 2dx C++. The sprite sheet tutorial is absolutely and completely worthless. I do not understand anything.

I’ve been looking at that sheet page I don’t get it. What do I do?

Can you guys show me?

Any assistance using an example would be greatly appreciated. I really need this!