Flash outpur variables

Hi All,
I’m new to flash, have some experience with HTML and JavaScript.
I wonder if and how I can have a flash object in an HTML page that returns or updates a variable in the page, or assigning it to an input element’s text property…
for example a flash with a form that upon submission updates the equivalent form in the HTML.
(I know I can do it all in HTML, just wondered on how its done…)
any help will be appreciated, a small example even more… :wink: