there are a few ways to communicate with external scripts. Look in the help menu for external communication/ or communicating with JS. An easy to access your JS from flash is to put the JS in a function in the
Code:
<head> function imgWriter(myReallyCoolHref)
{
document.write('<IMG src=myReallyCoolHref');
}</head>
of your html. Then in flash call it from a button; passing the argument/s. For example:
Code:
my_btn.onPress=function(){getURL("javascript:imgWriter('"http://www.example.com/pic.jpg"');}