3 Replies Latest reply on Jun 23, 2009 11:59 AM by kolban1

    ExternalInterface.addCallback fails on ie; objectID=null

    kolban1 Level 1

      I have been battling a problem solidly for two days now.  I have an application in JavaScript that dynamically inserts a Flash player in JavaScript into the DOM tree that then loads a Flex application.  This application then registers a callback using ExternalInterface.addCallback().  Although this call succeeds, I am unable to call back into the Flex application from the JavaScript.  It is as though my Flex exposed function was never registered.


      As I scanned the Internet, I examined many different possibilities:


      o I checked that I had supplied an 'id'

      o I checked that my AllowScriptAccess=always

      o I checked that I had supplied a type=application/x-shockwave-flash


      But .. and here is the very odd thing; it is working perfectly for FireFox 3.0.10 but fails for IE7 and IE8.


      The one clue that I have is that the ExternalInterface.objectID is 'null' prior to the ExternalInterface.addCallback().


      I am pretty sure this isn't supposed to be happening.


      I wrote a trivial sample that runs just fine in IE8 where the Flash player is created statically in the HTML but when created in my other application dynamically ... this is when we have problems.


      By dynamically, imagine an HTML button on the screen that, when pressed, inserts an <Object> for flash into the DOM tree.   The player shows up fine and the application runs, it just doesn't allow for the ExternalInterface.addCallback() to work.


      Hope someone can assist.