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 have a CCLabelTTF in the top right hand corner of the view.

scoreLabel = [CCLabelTTF labelWithString:@"0000" fontName:@"Marker Felt"   
fontSize:30 ];
scoreLabel.color = ccGREEN;
[self addChild:scoreLabel];

I simply add this code to the bottom of the above method. However as soon as i add this line, the label doesnt show up at all.

id moveScore = [CCMoveBy actionWithDuration:.7 position:ccp(scoreLabel.position.x + 10, 0)];
CCRepeatForever *scrollScoreLabel = [CCRepeatForever actionWithAction:moveScore];
[scoreLabel runAction:scrollScoreLabel];

Any help is greatly appreciated!

share|improve this question
up vote 1 down vote accepted

The problem is that you are moving the label to the right (420+10 points). I don't know what do you want to achieve with this action but basically you are continuously moving the label to the right. If you don't understand, change the duration of the animation to something like 2 and you will see the problem.

share|improve this answer

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.