# Calling Javascript functions (I know how to, but question)

**URL:** <https://forum.kirupa.com/t/calling-javascript-functions-i-know-how-to-but-question/320326>\
**Category:** flash\
**Created:** [March 20, 2011, 7:55pm UTC](https://forum.kirupa.com/t/calling-javascript-functions-i-know-how-to-but-question/320326 "2011-03-20T19:55:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jany](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@jany](https://forum.kirupa.com/u/jany)\
**Post date:** [March 20, 2011, 7:55pm UTC](https://forum.kirupa.com/t/calling-javascript-functions-i-know-how-to-but-question/320326/1 "2011-03-20T19:55:40Z")

</div>

In order to make a javascript call from AS3, we do this:

```auto
import flash.external.ExternalInterface;

ExternalInterface.call("myJavascriptFunction()");

```

What if the function is in a different folder from where the .SWF rests?

Example:

MY.SWF is the root folder on my server  
The java function is in /include folder on my server

Thanks!
