title: Is there a workaround for the missing ExternalInterface.objectID in ActionScript 2
body: <p>I'm downporting some ActionScript 3 to ActionScript 2 (some ad agencies sadly still refuse to embrace the future) and I've run into the issue that in ActionScript 2 <code>ExternalInterface</code> has no <code>objectID</code> property, as it does in ActionScript 3.</p>
  
  <p>The code I'm working on calls a lot of JavaScript, and some of that code requires the script to know the ID of the Flash object/embed (for example to find the position on the page, and to resize the object/embed).</p>
  
  <p>Is there a simple workaround to get hold of the object/embed ID in ActionScript 2?</p>
  
  <p>I have managed to write some JavaScript code that basically searches all object and embed nodes on the page until it finds one with a special method (set with <code>ExternalInterface.addCallback</code>) and that way managed to get the ID into the ActionScript environment, but it feels like a hacky and unsafe method to rely on. Surely there is a simpler way?</p>
  
  <p><em>Edit: I don't have control over the code that embeds the SWF, so passing in the ID doesn't work.</em></p>