Calling an ActionScript Function from JavaScript
This tutorial will show you how to use the FlashProxy JavaScript class to proxy function calls between Flash and JavaScript.
Read more here
edit: Programming/Javascript/auto___calling_an_actionscript_function_from_javascript.wikieditish...