External Interface call doesn't work with function that is on external JS file

Hello

I am using in AS3 "External Interface ".
When I call the JS function that is on the same page as swf everything works fine.

I added a link in the html page to an external JS file, when I move the JS function to the external JS file the website crushes.

I would prefer to have all my JS functions on an external file so I can use them in the future in other project and it also makes it easier for me to update the site.

Any ideas on how to call a JS function that is on an external file from AS3?

Thanks for your help,
Moshe