# Calling Javascript function from Flash

**URL:** <https://forum.kirupa.com/t/calling-javascript-function-from-flash/325961>\
**Category:** flash\
**Created:** [November 14, 2011, 2:08pm UTC](https://forum.kirupa.com/t/calling-javascript-function-from-flash/325961 "2011-11-14T14:08:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marycb](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@marycb](https://forum.kirupa.com/u/marycb)\
**Post date:** [November 14, 2011, 2:08pm UTC](https://forum.kirupa.com/t/calling-javascript-function-from-flash/325961/1 "2011-11-14T14:08:46Z")

</div>

Hi,

I am trying to call a Javascript function in flash. I am able to call the function using the following code:

```auto
ExternalInterface.call("alert"); 

```

I have a flash movie and I want the javascript function to be called when the movie finishes but the code above calls the function at the beginning. Would anyone be able to tell me how I would get this to work the way I want it to? I’ve tried to find it but having no luck ☹
