title: How to mask sprites in cocos2d?
body: <p>I've read Ray Wenderlich's tutorial on sprite masking: <a href="http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0" rel="nofollow noreferrer">http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0</a>. However, my understanding of openGL is poor, and this tutorial doesn't produce the effect I desire. What I would like to do is to mask one sprite/layer with another, and move the sprite behind the mask to create a "shiny" animation, like so:</p>
  
  <p><img src="https://i.stack.imgur.com/AenxI.png" alt="enter image description here"></p>
  
  <p>Additionally, how could I make the mask dynamic (ex: changing the text string), and how could I make a sprite or layer count its children as part of the mask?</p>