Look at ExternalInterface in the online help. This is the external API that you can use to communicate between Flash and the html page that holds it.
Thanks Rob, will do.
For anyone else looking into this issue there are some links to the ActionScript documentation on this StackOverflow post and an explanation of how to use ExternalInterface halfway down the page in this Adobe Devnet tutorial.
Presumably you'd first import the ExtenalInterface class into your Flash with