Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a card game and would like to ask if someone could advice me how to implement a flip of a card in Cocos2D?

share|improve this question
found a possible solution: – PeterK Nov 30 '11 at 22:43

Flip animation in cocos2d-android-1 like that...

CCSprite sprite=CCSprite.sprite("icon.png");
CCIntervalAction a = (CCIntervalAction)CCOrbitCamera.action(2, 1, 0, 0, 360, 0, 0);
share|improve this answer

ios objective-c version:

CGSize winSize = [CCDirector sharedDirector].winSize;
CCSprite *player = [CCSprite spriteWithFile:@"Games1.png"];

player.position = ccp(player.contentSize.width/2, winSize.height/2);

CCActionInterval *a = [CCOrbitCamera actionWithDuration:2 radius:1 deltaRadius:0 angleZ:0 deltaAngleZ:360 angleX:0 deltaAngleX:0];
[self addChild:player];
[player runAction:[CCRepeatForever actionWithAction:a]];
share|improve this answer
Answers that are just code without explanation are poor answers. They're not very good because they don't do much to help users learn. – Byte56 May 22 '13 at 19:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.