title: How to create an animated tiled background from a texture atlas with Cocos2d
body: <p>I want to create a CCLayer with an <strong>animated tiled background</strong> from a <strong>larger texture atlas</strong> with <strong>Cocos2d</strong>.</p>
  
  <p>I know how to drop a background in a CCLayer. I know how to create an animated CCSprite. I even know how to handle tiled world maps. <strong>But I can't find a proper way to combine all these elements in the desired form.</strong></p>
  
  <p><strong>How would I do this?</strong></p>
  
  <hr>
  
  <p>Example case: Let's say I have a 512x512 texture atlas. On it are six frames drawn next to each other, all of them 32x32, starting from the top left (0.0).</p>
  
  <p>Now I would like my CCLayer's background to display a tiled image consisting of 10 by 15 tiles. Plus, the tiles themselves should animate with the six frames from the texture atlas. </p>
  
  <p>As a bonus, the animation itself should be controllable. (I want to be able to speed it up, slow it down or reverse it)</p>