Most of the time you see leak-proof window flashing details, they are for new construction. The step-by-step slideshow "Flashing a Flanged Window," JLC 11/12 and the article and slideshow "Flashing and Trimming a Window," 8/12 are classic examples that cover the gamut of today's state-of-the-art flashing materials.
Replacement windows are a different animal altogether. Integrating tape flashing with the weather barrier (if there is one), is no small trick when the building is already sided. But that's no reason not to try. The result of leaks can be a legal mess, and it's always better not to involve your insurance company (see "Legal Adviser: Liability Insurance," JLC 9/02).
A finned vinyl replacement unit in wood-frame walls will require good quality sealants strategically placed (see "Installing Replacement Windows,"). Peel-and-stick flashing tape can be used for a full-frame replacement insert (see "Flashing Replacement Windows," FHB 3/08).
In a brick veneer home, peel-and-stick flashing is a critical ingredient. Sometimes you have room in the brick opening to flash (see "Installing Full-Frame Replacement Windows," JLC 10/13). Other times it's harder to get the flashing in the right place, however (see "Replacing Windows in Brick-Veneer Homes," Coastal Contractor, 5/07).
Stucco is just a bear. The ferocious part is patching in stucco so it's not painfully obvious afterwards. It is possible to avoid an unsightly stucco patch around the window (see "Replacing Windows in Stucco Walls," JLC 6/04), but getting it right will be difficult. If you really want the patch to disappear, plan to stucco the whole wall, corner-to-corner, and no one will be able to tell the difference when you're done.