title: flash external ExternalInterface call in as2
body: <p>I have an external interface call which should retrieve some text from the html that the swf is embedded in. </p>
  
  <pre><code>var name:Object = flash.external.ExternalInterface.call(
      "function(){return JSObject.get('Resource', 'name');}");
  </code></pre>
  
  <p>When I put the variable name into a textbox I get the correct text.</p>
  
  <p>when I use geturl with a clickTag, under some circumstances it works (unencoded clickTag url). Sometimes it's undefined (encoded clickTag urls). If I use <code>name.toString</code> then it opens <code>http://www.someurl.com/[type%20Function]</code> or displays <code>[type%20Function]</code> in a textbox.</p>
  
  <p>So I suspect that I'm having encoding issues when passing on the clickTag url. My question is, how do I convert this object to a string or assign the contents of the object to a string variable  to avoid all this?</p>
  
  <p>Thanks</p>