How many ways do Flash and HTML interact? How to choose?

  question, ruby

In general, how many ways can html and flash be designed interactively? Which is better

Flash can output js to the page, call js in html, or be called back by js in html. Js can modify the params of flash to control flash.
That is, flash controls DOM through js to interact with html, and js controls flash by modifying the params of flash