Serve javascript file via http Handler

I’ve written a HTTP Handler that outputs content depending on values passed to the handler. I am trying to extend it so that it outputs flash aswell, however to do so I need to also serve a javascript file. The javascript file itself is an embedded resource in another assembly, so I am trying the following: