3 Replies Latest reply on Aug 19, 2013 12:24 PM by sinious

    Flash debug player's ExternalInterface.objectID==null, but not in non-debug player, ceteris paribus

    James22s22 Level 1

      If the HTML object tag for the debug flash player has an "id" attribute, but no "name" attribute, then ExternalInterface.objectID is null.

       

      With absolutely nothing else changing... I leave Chrome's plugin page open so I can disable the built-in player and enable the debug player, and when I refresh the page to reload the swf file on the page, the code runs and indicates that ExternalInterface.objectID is null.  If I switch back to the built-in player, it works fine again.  What's going on?

       

      I'm using swfobject to embed the swf in the HTML page, and after reading some forums, someone mentioned that if you add the "name" to the attributes parameters for swfobject with the same value as the id, then ExternalInterface.objectID is not null in the debug player.  Indeed, after ensuring the "name" attribute made it into the object tag as well, the debug player ExternalInterface.objectID is no longer null and matches the behavior of the built-in player.

       

      It would be very nice if someone could tell me why the debug player seems to need the "name" attribute, but the built-in player just picks up the "id" attribute.  The DOM looks identical otherwise, in case anyone suspects swfobject is doing something differently with the two players, but it's not.  Chrome's developer tools shows the same exact DOM object being constructed in either case, so there must be something different about the two players.  Built-in is version 11.8.800.97, and debug is version 11,8,800,94.

        • 1. Re: Flash debug player's ExternalInterface.objectID==null, but not in non-debug player, ceteris paribus
          sinious Most Valuable Participant

          Did you read the old docs on ExternalInterface.objectID? It still states it returns the "id" for IE (InstallAX.exe) object or the "name" of a Netscape embed (InstallPlugin.exe). Now, it does say Netscape which is amusing but it could still be true. I have my documentation filters up to version 11.8 and it still states it:

           

           

          objectID

          property

          objectID:String  [read-only]

          Language Version: ActionScript 3.0
          Runtime Versions: AIR 1.0, Flash Player 9, Flash Lite 4

           

           

          Returns the id attribute of the object tag in Internet Explorer, or the name attribute of the embed tag in Netscape.

           

          It's anyone's guess if this is still the case.

          • 2. Re: Flash debug player's ExternalInterface.objectID==null, but not in non-debug player, ceteris paribus
            James22s22 Level 1

            Yes, I read that documentation a long time ago, and that's what I suspected, but...

             

            The problem is that both of these plugins are running in the same browser (Chrome), yet one uses "name" while the other uses "id".

             

            Since Chrome's plugin was using "id", one would expect the debug version of the player in that same browser to use the same "id" attribute.  Instead, the behavior is inconsistent in the same browser.

             

            I'm surprised swfobject doesn't include "name" by default, given the history of the different plugin versions.

             

            The built-in player says the plugin type is: "PPAPI (out-of-process)" (Pepper Plugin API) while the debug player has type "NPAPI" (NetScape Plugin API).  The Pepper Plugin API must use the "id" attribute while the NetScape API still uses the "name" attribute.  Adobe should probably update the docs to account for this new "Pepper" API and say it uses the "id" attribute as well, and may want to mention that Chome uses a different API for the debug player.

            • 3. Re: Flash debug player's ExternalInterface.objectID==null, but not in non-debug player, ceteris paribus
              sinious Most Valuable Participant

              I expect Firefox would also indicate NetScape Plugin API as well. In this case it appears their docs are already up to date though, although using "Netscape" does add a layer of dust to it.

               

              Hopefully you can just add the name to swfobject and don't have to many separate objects so it's not that big of a deal in the end.

              1 person found this helpful