# ExternallInterface.Call and Loader

**URL:** <https://forum.kirupa.com/t/externallinterface-call-and-loader/316880>\
**Category:** flash\
**Created:** [December 5, 2010, 4:40am UTC](https://forum.kirupa.com/t/externallinterface-call-and-loader/316880 "2010-12-05T04:40:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![euphoria2009](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@euphoria2009](https://forum.kirupa.com/u/euphoria2009)\
**Post date:** [December 5, 2010, 4:40am UTC](https://forum.kirupa.com/t/externallinterface-call-and-loader/316880/1 "2010-12-05T04:40:24Z")

</div>

I am resizing the height of a div using ExternallInterface.call based on the height of some dynamic components in my flash movie. I am also loading multiple images using the loader class. The javascript seems to block the loading of the images.

-If I load the images before the ExternallInterface.call I have no problems. However, if I use ExternallInterface.call before loading the images, the images don’t appear.

ACTIONSCRIPT:  
var eiEnabled:Object = ExternalInterface.call(“changeDivHeight”, newDivHeight);

JAVASCRIPT IN HTML PAGE:  
function changeDivHeight(windowHeight) {  
document.getElementById(“flashContent”).style.height= windowHeight;  
}

is this expected behavior? could anyone think of a workaround?

[http://www.jaridworks.com/v2/selectorGrid.swf](http://www.jaridworks.com/v2/selectorGrid.swf) (works as expected)  
[http://www.jaridworks.com/v2](http://www.jaridworks.com/v2) (images don’t load because javascript is fired)
