Lightbox using AS3

I can’t seem to find any tutorials on this for AS3 on the web.
I have images set up already in a flash gallery that I want to use lightbox to show larger and maybe even a few more images per thumbnail.

I have my javascript in my HTML set up:

<script type="text/javascript">
function SWFDelegate(url,width,height,caption) {
   var objLink = document.createElement('a');
   objLink.setAttribute('href',url);
   objLink.setAttribute('rel','lightbox');
   objLink.setAttribute('title',caption);
   if(typeof width != 'undefined') {
      objLink.setAttribute('width',width);
   }
   if(typeof height != 'undefined') {
      objLink.setAttribute('height',height);
   }
   Lightbox.prototype.start(objLink);
}
</script>

AS3 (not working)

test_mc.addEventListener(MouseEvent.CLICK,SWFDelegate);

function SWFDelegate(event:MouseEvent):void
{
ExternalInterface.call("SWFDelegate" "image/dfgaer.jpg","640","399","cheese" );
}

test_mc.buttonMode = true;

Any idea where I’m going wrong?