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

**URL:** <https://forum.kirupa.com/t/external-interface-call-doesnt-work-with-function-that-is-on-external-js-file/328070>\
**Category:** flash\
**Created:** [April 17, 2012, 8:34am UTC](https://forum.kirupa.com/t/external-interface-call-doesnt-work-with-function-that-is-on-external-js-file/328070 "2012-04-17T08:34:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moshe\_Shein](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Moshe\_Shein](https://forum.kirupa.com/u/Moshe_Shein)\
**Post date:** [April 17, 2012, 8:34am UTC](https://forum.kirupa.com/t/external-interface-call-doesnt-work-with-function-that-is-on-external-js-file/328070/1 "2012-04-17T08:34:05Z")

</div>

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
