# onEnterframe killing ExternalInterface call

**URL:** https://forum.kirupa.com/t/onenterframe-killing-externalinterface-call/277556
**Category:** flash
**Created:** [December 13, 2008, 5:11pm UTC](https://forum.kirupa.com/t/onenterframe-killing-externalinterface-call/277556 "2008-12-13T17:11:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kobalt7](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@kobalt7](https://forum.kirupa.com/u/kobalt7)
#### Post date: [December 13, 2008, 5:11pm UTC](https://forum.kirupa.com/t/onenterframe-killing-externalinterface-call/277556/1 "2008-12-13T17:11:09Z")

</div>

Hi ive been having trouble getting flash to run a ExternalInterface.call to javascript to load the next movie when the current one is done, it seems to work fine when the files are local but not when they are on another server, i added the allowdomain and it works for the initial load but after that kaput so to speak, i suspect its because im checking the flash for completion with an onEnterframe script but i cant be sure  
heres the offending code

```auto
_root.cliploaded = false;
this.onEnterFrame = function() {
    if (_root.newsrecreate._currentframe eq _root.endframe && _root.cliploaded == true) {
        trace("done playing");

        flash.external.ExternalInterface.call("FlashMovieCompleted");
        _root.newsrecreate._y=24
        //delete onEnterFrame
    }
};

```
