You use what's called layer clipping or layer masking.
For a basic layer mask effect, you need two layers, one text and one for the shine.
Like so:
Make the shine how you'd like it, like so:
Then, if you're on a PC, hold ALT and hover between the Shine and TEXT layers until your mouse turns into two intersecting circles. Click when you see that pointer graphic, and you'll have created a clipping mask. That means, the only visible pixels in the top layer will be those which overlap the bottom layer. The result will look like this:
You will be able to move the shine layer freely, and it will automatically update to hide pixels which don't overlap the text layer. Then it's just a matter of animating the shine layer to smoothly move horizontally across the text.
So WITHOUT the layer masking, you'd have
And WITH it, you'd have
-----------------------------------------------------------------------------------
As far as the animation aspect goes, I'm running CS5, so I have to do it frame by frame. This means I have this:
Where I'd make one frame, position the shine, then make a new frame, move the shine over x number of pixels, and repeat until the shine has traveled entirely across the surface of the text. So each frame you see there, the shine layer has been moved over about 20 pixels. It's tedious with CS5, but I think CS6 has enhanced animation features. You might be able to set "Point A" and "Point B", and have the program interpolate the transition from A to B automatically, as per what you do with more sophisticated animation software.
With the above method, you don't need 12 separate shine layers, it will save the position of the pixels in each frame. If you wish to edit a layer for EVERY frame, you must first select Frame #1 manually, THEN perform the edit. Otherwise, if you have Frame #12 selected, it will only edit the pixels for that frame.