Sometimes this fails due to security settings on the browser - for example, if
the window that holds Flash was not spawned by Javascript, then the window is
not allowed to close itself - other cases javascript like this will fail
completely. As long as Javascript is allowed in some form on the end user's
browser, then what we do which works everytime is create an HTML file that has
this in it:
<html>
<head>
<title>Close Window</title>
</head>
<!--This file is just a hack to just make the window close itself-->
<BODY ONLOAD="top.close()">
</body>
</html>
Then, make your button in Flash do a getURL() to that file (Do NOT specify a
target param) - the Flash file will navigate away from it's own HTML file, and
the new HTML file will close itself. So to the user, the Flash file closes
itself, even though in reality it just navigated away and another file does the
closing.
Jason Merrill
Bank of America
Global Technology & Operations
Learning & Leadership Development
eTools & Multimedia Team
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf
>>Of Carolina Avila Coral
>>Sent: Monday, March 19, 2007 8:21 PM
>>To: Flashcoders mailing list
>>Subject: [Flashcoders] window.close() doesn't work in player 7.0.69
>>
>>Hi:
>>
>>My client and his employees have flash player version 7.0.69
>>
>>I tried with a new movie with only a button and the button
>>has the code:
>>
>> on(release){
>> getURL("javascript:top.window.close();");
>>}
>>
>> Then I tried with a new javascript funcion and with
>>fscommand as you suggest in all emails in the list about
>>close window, but It doesn't work. I tested in flash player
>>7.0.19 and 8 and 9 and it works. But the client needs the
>>movie works on 7.0.69 with IE and I couldn't find the issue.
>> I aprecciate if you can help me.
>>
>> I uplodad the flash player 7.0.69 installer in my server.
>>http://www.pixelgroup.net/carolina/flashplayer7r69_winax.exe
>>
>>Thanks a lot
>>Carolina Avila
>>
>>______________________________
>>Visita http://www.tutopia.com y comienza a navegar más rápido
>>en Internet. Tutopia es Internet para todos.
>>_______________________________________________
>>[email protected]
>>To change your subscription options or search the archive:
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>>Brought to you by Fig Leaf Software
>>Premier Authorized Adobe Consulting and Training
>>http://www.figleaf.com http://training.figleaf.com
>>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com