Example:
Step 1
Open Adobe After Effects CS3 Professional.
Step 2
Choose Composition > New Composition (Ctrl+N). For Composition Name type OverlayTextEffect, for Preset set Custom, for Pixel Aspect Ratio set Square Pixel, for Width set 300, for Height 200 px and for Frame Rate set 30 fps and click ok. See the picture below!

Step 3
Select the Horizontal Type Tool (Ctrl+T) and type any text on the Stage. See the picture below!

Step 4
Choose Window > Effects&Presets (Ctrl+5).
Step 5
In the Effects&Presets Panel choose Animation Presets > Text > Lights and Optical > Overlay. See the picture below!

Step 6
Using the Selection Tool (V) and drag and drop technique, move the Overlay effect from Effects&Presets panel on the text on the stage.

Step 7
Go now to the Timeline and reduce the length of the film to the length of the animation.

Step 8
After that, choose Composition > Trim Comp To Work Area.
Step 9
Choose now File > Export > Adobe Flash (Swf).
Step 10
Create a new flash document. Set the Width of Your document to 300 and Height to 200 px. Set Black color as background color and set the Frame Rate to 30 fps.
Step 11
Create a new Movie Clip (Ctrl+F8) and name it OverlayTextEffect.

Step 12
Call the current layer overlay text.
Step 13
Choose now File > Import > Import to Stage (Ctrl+R) and Import a swf file that we just made in After Effects.
Step 14
Select now the Last Keyframe and go to the AS panel (F9). Then, enter this code inside the actions panel:
stop();
Step 15
Go back on the main stage (Scene 1). After that, drag the Text Movie Clip from the Flash Library on the Flash Stage using the Selection Tool (V) and drag and drop technique.
Step 16
Click now on frame 1412 (as the movie length) and hit F6 key.
We're done!
Test your effect and enjoy!