There are multiple ways to do this, i choose this method since it works for me. Be sure to light your green screen even, if the color is as even as possible you will get the best results. So try to avoid shadows and stuff.
Import your footage in AfterEffects and place it in a new composition. Rightclick on your video layer and choose: “effect” – “keying” – “color key”. In your Effect control panel you can choose the key color directly from your video with the dropper tool. With “Color Tolerance”, “Edge Thin” and “Edge Feather” you can smooth out your keying.
In the case of multiple tones of green in your footage i normally use the color key multiple times to get the best effect.
After you are done with the keying part it is time to either add a new layer under the keyed layer, or export your movie for use in Flash for example.
When you want to use your movie with the transparency in Flash, choose “Composition” – “Make Movie”. In your “Render Que” settings, click on “Output Module” – “Lossless”. Click behind “Format” on the pull-down menu and choose “FLV”. Click behind “Channels” on “RGB + Alpha”. Click OK. Now render your movie and once finished your footage is ready to be imported in Flash, with transparency!