If you control both the host page and the flash movie, then you can generate the screenshot in flash, and simply send it to javaScript, and then do whatever you need with it in javaScript.
In ActionScript:
import flash.external.ExternalInterface;
ExternalInterface.call("showBase64Image", generateBase64Screenshot());
// see this Mario Klingenmann's file for ideas how to do that http://www.quasimondo.com/archives/000572.php
And then in javaScript:
function showBase64Image(base64data) {
var img = document.createElement('img');
img.src = base64data;
document.body.appendChild(img);
}
P.S. don't forget to allowScriptAccess
for embedded Flash, to allow Flash movie to access the javaScript on your page (which is definitely not wise if the Flash movie is made by a 3rd party).
On the other hand, if you do not control the flash movie (for instance if you wanna make a website that'll host 3rd party Flash games) then you're out of luck, and what you need is not doable with javaScript alone, and it can only be achieved through use of browser plugins/extensions.