You are trying to access the JavaScript object 'window', but you are in
the ActionScript world, and there the window you are looking for does
not exist.
Write a _global_ JavaScript function that calls window.close().
And from AS call that Function.
JS
function closeWindow() {
window.close()
}
AS
ExternalInterface.call("closeWindow");
Alger
John wrote:
>
>
> Hi there,
>
> I am trying to create a close window routine that will be run when a
> user clicks the exit button using the following:
>
> <!-- Routine to Close down the Courseware -->
> <mx:Script>
> <![CDATA[
> private function closeWindow():void{
> ExternalInterface.call(window.close);
> }
> ]]>
> </mx:Script>
>
> Now I am getting silly errors like Access of unidentified property
> window. Can someone please shed some light on this
>
>