title: Calling javascript via AS3 externalinterface within a colorbox
body: <p>I have a swf that opens up inside a colorbox window. When the video finishes playing, I make an externalinterface call to a javascript function to close the colorbox.</p>
  
  <p>I'm trying to execute the following AS3 code:</p>
  
  <p><code>ExternalInterface.call('parent.$.fn.colorbox.close()')</code></p>
  
  <p>I can't seem to get this to work. The colorbox won't close.</p>
  
  <p>I also tried this to see if I was just making the wrong function call, but this didn't work either:
  <code>ExternalInterface.call('alert("hello world")')</code></p>
  
  <p>However, if I browse to the url of the swf file, so that it doesn't open inside the colorbox, the alert() call works just fine.</p>