Kenneth,
I agree with the comments about not foaming over the ductwork. If you ever have to do electrical or other work up there, you'll be cursing yourself. Instead, move the ducts into the conditioned living space. Foam the underside of the roof deck with high density polyurethane. 5+ inches. Seal the entire attic air tight, just like you would living space. No roof vents. No soffit vents. Foam and seal.
This has the added advantage of negating the energy loss due to air infiltration through any penetrations in the main living space ceiling, through the walls, etc. It a real bear to properly air seal a home by sealing every seam in the attic, so you negate the issue by enclosing the attic along the roofline. consult the following document for the science behind this approach:
There's more to this than insulation. Keep doing your research.
-tdi Energy Testing & Consulting