Auto close browser window

Sorry to bring this old topic again…
I wanna close my current(main) browser when a new pop up
browser appears,i found this code in html:

<object id=closeWin type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Close">

but i’m wondering what should i put the code in the flash?
Thanks a lot!

By the way, is that a way I click on the browser(main browser)
and it has no status bar,directories,menu bar and so on…?
Something like a pop up window. I found how to create a pop up but how can it be down in the main browser…

Thanks again

Full screen mode.

Lost in Beta posted this link - you might want to search the forum to see his comments about this subject.

http://www.dynamicdrive.com/dynamicindex8/window1.htm

not sure about the auto close…

TD

hmm… dunno about the code you posted, but if you want to do it in Flash all you need is this:


getURL("j avascript:window.close();");

(without the space in ‘j avascript’ wouldn’t display the word properly in this post if i didn’t have the space for some reason)

note that unless the window has been opended by your site using javascript you’ll be asked if you want to close the window when this code is executed. As far as I know there isn’t a way around this

if you are using the active-x method of closing to window to prevent the “Are you sure you want to close” alert from popping up, then don’t waste your time. As of the newest IE version, IE took out the methods of preventing that alert :frowning: They claim it is a “security risk”, but I doubt thats true.

actually i found this code in this forum
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=5236
I clicked on the link that Craig gave.It works without any dialog
box appears! But how do i do it with flash? What should I write
in flash. He didn’t state it in clear. Can someone helps me answer it?
Thanx a lot

Well if you notice in the .zip file it only gives files for IE4 and IE5, thats because IE6 no longer supports the method.

But if you insist… since it is an activeX object the code doesn’t go in Flash, it goes inside your .html file.

And you can call it in Flash with this…

[AS]on (release){
getURL(“java**script:closeWin.Click();”, “_self”);
}[/AS]

In theory that should work.