# ExternalInterface addCallBack not working please help

**URL:** <https://forum.kirupa.com/t/externalinterface-addcallback-not-working-please-help/332445>\
**Category:** flash\
**Created:** [June 10, 2014, 12:13pm UTC](https://forum.kirupa.com/t/externalinterface-addcallback-not-working-please-help/332445 "2014-06-10T12:13:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adBuryD](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@adBuryD](https://forum.kirupa.com/u/adBuryD)\
**Post date:** [June 10, 2014, 12:13pm UTC](https://forum.kirupa.com/t/externalinterface-addcallback-not-working-please-help/332445/1 "2014-06-10T12:13:36Z")

</div>

hi,  
I have tried almost everything I know about ExtrenalInterface.But the addCallBack is not working.  
It just keeps giving me the below error  
_this.getFlashMovie().sendToActionScript is not a function._  
This is my flash code.

```auto

Security.allowDomain("*");
import flash.external.ExternalInterface;
ExternalInterface.addCallback('sendScript',callback);
function callback(){
    txt.text="finall got it."
}

```

This is my html code

```auto

<script type="text/javascript">
    function getFlashMovie(movieName) {
               var isIE = navigator.appName.indexOf("Microsoft") != -1;
               return (isIE) ? window[movieName] : document[movieName];
       }
    function callToActionscript(data) {
        console.log("called: "+this.getFlashMovie("flashm"));
          getFlashMovie("flashm").sendScript(data);
       }
var params = {allowScriptAccess :'always'};
swfobject.embedSWF("extrenal.swf", "flashm", "550", "400", "9.0.0", "expressInstall.swf",params);
</script>
<input id="launchBtn" type="submit" onclick="callToActionscript();" value="Launch Lesson">
<div id=flashm></div>

```

All files are locally stored in same folder even the swfobject.js.  
My entire drive is allowed to communicate with the web too in the flash player settings.  
This is frustrating as I have already done a lot of these kind of examples but can seem to figure out why this is happening.  
The externalInterface.call() method works fine.  
Any help is really appreciated.  
Thank you
