ab1301 is correct: ActionScript in Flex can add properties and functions to the window object of a loaded HTML page (using cross-scripting). But you cannot do the same sort of thing with PDF content.
Unfortunately, as far as i can tell, Jeff is right.
I could be wrong, but from what I can tell any method that returns a document object throws a security error or returns undefined when called from a folder level script. This is very annoying and limiting, but so are a lot of security features.
One way you might be able to get around this depending on what you are trying to do is to use a batch script to add your document level script to all of your pdf documents. Of course this does nothing to allow immediate interaction with pdfs as you download them from the internet. (Plus, I am not certain this is even possible. Just an idea.)