How to write value from flash into html

Hi,I have 3 kind of texts with 3 buttons in my flash movie. When user press a button the corresponding text should be written into a text field in the html page.
Need your help, pls.