0 Replies Latest reply on Apr 6, 2010 9:35 PM by hemantThink

    External interface issues with mutiple swfs

    hemantThink Level 1



      We have an application wherein we have 2 divs in an HTML page. Conditionally, we load a different swf in each of these divs. Each of the swf's expose some external interface using the call: ExternalInterface.addCallback("methodName", methodName);

      Important thing is that both the swfs are using the same method names. However, they are in different divs.

      What we are seeing is this:

      1. On click of a button, we load swf 1 and div 1

      2. On click on another button we load swf 2 in div 2. At this time swf 1 is also loaded and present in div 1

      3. When both are loaded, the external interface methods of swf 1 have been set to null in the div 1.

      4. Due to this we are unable to call the external methods in swf 1 (using javascript).

      5. Swf 1 and swf 2 are not related as such except for the fact that they expose the same named external interface methods.


      This is how div1 looks after swf 2 is loaded in div 2:


      <div id="div1" style="width: auto; height: 738px; visibility: hidden;">


          <OBJECT id='swfid1' classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 width="100%" height="100%" externalMethod1="null" externalMethod2="null" browserURLChange="null" debugTrace="null">
              <PARAM NAME="_cx" VALUE="26458">
              <PARAM NAME="_cy" VALUE="19526">
              <PARAM NAME="FlashVars" VALUE="">
              <PARAM NAME="Movie" VALUE="/swf1.swf">
              <PARAM NAME="Src" VALUE="/swf1.swf">
              <PARAM NAME="WMode" VALUE="Window">
              <PARAM NAME="Play" VALUE="0">
              <PARAM NAME="Loop" VALUE="-1">
              <PARAM NAME="Quality" VALUE="High">
              <PARAM NAME="SAlign" VALUE="LT">
              <PARAM NAME="Menu" VALUE="-1">
              <PARAM NAME="Base" VALUE="">
              <PARAM NAME="AllowScriptAccess" VALUE="sameDomain">
              <PARAM NAME="Scale" VALUE="NoScale">
              <PARAM NAME="DeviceFont" VALUE="0">
              <PARAM NAME="EmbedMovie" VALUE="0">
              <PARAM NAME="BGColor" VALUE="">
              <PARAM NAME="SWRemote" VALUE="">
              <PARAM NAME="MovieData" VALUE="">
              <PARAM NAME="SeamlessTabbing" VALUE="1">
              <PARAM NAME="Profile" VALUE="0">
              <PARAM NAME="ProfileAddress" VALUE="">
              <PARAM NAME="ProfilePort" VALUE="0">
              <PARAM NAME="AllowNetworking" VALUE="all">
              <PARAM NAME="AllowFullScreen" VALUE="false">


      Any help is appreciated.


      We have tried using different names of the external interface methods from the 2 swfs. That does not help.