title: How to set the frame of an animation in cocos2d
body: <p>I have made a CCAnimationHelper class that performs the following. You give it a fileName, a frameCount, and a Delay and it will give you back an animation. The thing I want to know is how to set the frame of the animation so instead of starting at frame 1, it will start at frame 10 instead. Here is my code</p>
  
  <pre><code>// Creates an animation from sprite frames.
  +(CCAnimation*) animationWithFrame:(NSString*)frame frameCount:(int)frameCount delay:(float)delay
  {
  // load the ship's animation frames as textures and create a sprite frame
  NSMutableArray* frames = [NSMutableArray arrayWithCapacity:frameCount];
  for (int i = 1; i &lt; frameCount; i++)
  {
      NSString* file = [NSString stringWithFormat:@"%@%i.png", frame, i];
      CCSpriteFrameCache* frameCache = [CCSpriteFrameCache sharedSpriteFrameCache];
      CCSpriteFrame* frame = [frameCache spriteFrameByName:file];
      [frames addObject:frame];
  }
  
  // return an animation object from all the sprite animation frames
  return [CCAnimation animationWithFrames:frames delay:delay]; //Is there another method I should be using here to set the frame
  }
  </code></pre>