# How do I call a function from a .js file from within flash?

**URL:** <https://forum.kirupa.com/t/how-do-i-call-a-function-from-a-js-file-from-within-flash/254504>\
**Category:** flash\
**Created:** [March 12, 2008, 7:17pm UTC](https://forum.kirupa.com/t/how-do-i-call-a-function-from-a-js-file-from-within-flash/254504 "2008-03-12T19:17:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpearson311](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jpearson311](https://forum.kirupa.com/u/jpearson311)\
**Post date:** [March 12, 2008, 7:17pm UTC](https://forum.kirupa.com/t/how-do-i-call-a-function-from-a-js-file-from-within-flash/254504/1 "2008-03-12T19:17:36Z")

</div>

I have a javascript file and I’m trying to call a function within the file from within a flash file, but it’s not working. Any ideas? Here is the code from the flash file:

```auto
return_mc.onRelease = function():Void{
 getURL("javascript:parent.populateFrame('lead/lead.html')");
};

```

The .fla is published as a html file and I have the .js file linked with the html file. Any help would be appreciated.

JPearson311
