Html background change issue

how do you make a button in flash tell the background color of an html page to change, like the javascript code:

document.bgcolor = #xxxxxx;

… i dont understand how to get flash and the html page it is displayed in to communicate w/ each other.