Well,
I have never needed to use this code myself so I have no samples.
However, this is some of the support in the flash manual:
However, I THINK this sends values from flash into the javascript.
Either way, this is the only real way that flash has interaction with the browser.
In the HTML page that embeds the Flash movie, add the following Javascript code:
function theMovie_DoFSCommand(command, args) {
if (command == "messagebox") {
alert(args);
}
}
2 In the Flash movie, add the FS Command statement whenever you want to open a message dialog box:
FS Command ("messagebox", "This is a message box invoked from within Flash.")
You can also use expressions for the FS Command statement and arguments, as in the following example:
FS Command ("messagebox", "Hello, " & name & ", welcome to our website!")
You can set up the HTML page to support this by creating your own template and using the Publish and Preview commands. See Flash publish settings.