Accessing javascript through actionscript

Hi,

I’m fairly new to the world of actionscript…actually, I’m new to the world of scripting languages altogether. That said, I’m faced with a particularly challenging task.

Here’s the scenario as the end user would see it:

They are on the html site, where they click on an html link which opens a transparent animation right on top of the html content. I’ve got this portion working in both IE, and in Firefox. Here’s where I start getting hung up. On the upper right corner of this transparent animation, I have a close button that needs to close the .swf file. I do have the javascript set up in the html code that will close the .swf file, but how do I access this javascript with actionscript embedded in the swf file? I’ve tried to get it to work in both AS 2.0 and in AS 3.0. with no luck so far.

Here’s the code that I’ve used for 3.0:

close_btn.addEventListener(MouseEvent.CLICK, closeMovie);
function closeMovie(evt:MouseEvent):void
{
ExternalInterface.call(“closeMovie”)
}

…and here’s the code that I’ve used for 2.0:

close_btn.onRelease = function(){
ExternalInterface.call(“closeMovie”);
}

Both have the same result: No response. Does anyone have any thoughts or suggestions? I’m hitting the proverbial wall and any insight would be greatly appreciated.