Painting While Preserving Transparency
Photoshop CS3 Tutorial
How to Only Paint Non-Transparent Pixels in Photoshop
The background layer is a solid, opaque layer. All other layers are either transparent, opaque or a combination. If you have a layer that is part transparent and you want to paint only the "live pixels", this technique is quite helpful.
Open a new document in Photoshop (File > New). Set the background to White, Size to 500 pixels by 500 pixels and the Resolution to 72 ppi.
Add a new text layer by clicking the Text tool, clicking the workspace and entering your text.
Select the Text layer and choose Layer > Rasterize > Type.
With the Text layer still active, click the Lock Transparent Pixels icon on the Layers palette.
Select the Brush tool and paint the Text layer. The brush will only work on the non-transparent areas.