Here's GBT thread on the subject http://www.greenbuildingtalk.com/Fo...fault.aspx
Freakboy mentions using flashing bent at some angle and inserted into a groove or kerf cut at a like angle into the foam above the window buck. I spoke with a Tyvek expert at the Home Builder's Show back in 2010, who confirmed that's what he does. Be sure flashing extends a foot beyond each side of the window and covers the header flashing tape. This will work for windows mounted flush to the exterior plane.