Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Trap Browser Close?



Is there a way (via flash or, more likely, javascript) to intercept the browser window close button being pressed??

How about disabling the close button.

Both seem like they would be bad ideas, but I just thought I'd ask as we've got a SCORM course and would like to set the bookmark when the user exits the course instead of doing on every new page.

Thanks!!



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-02-2006, 12:49 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Close Browser
Can I close the browser window from within Flash?
thx

To Close Browser....
If I have created a button and want it to close the current browser at release of mouse click, what is the actionscript command for this? Anything you can know about this is greatly appreciated.

Close Browser
You people are brilliant.

At the end of my flash movie (in an html page) i want it to automatically close the browser window it is in. Does anyone know how?
thanks,
dawn

Close Browser
What is the code to close a browser window? I think this is it:
getURL("javascript:self.close()");

but it didn't work for me.

Close Browser
If I have a button, what action script do I have to give it in order for it to close the entire browser window?

I hope someone can help

thanks

Dan

Close Browser
Ok, my apologies because this is probably a really stupid question, but i just cant seem to think of what im supposed to be doing.

Im launching a flash file in a new browser window (as a virtualtour) and want a button in the flash to close the browser window...
What do i need to do?

Thanks for the help!

Browser Close
Is it possible to detect the browser window closing? I've just been chatting with a guy who is adamant that this is possible, but I can't work out how?

Cheers in advance,

Tim

Close Browser Window
Hello,

Does anybody know if there is a script for a button that will close the browser window in which the swf is playing?

Emily

Close Browser Window
Hello,

Does anybody know if there is a script for a button that will close the browser window in which the swf is playing?

Emily

Close Browser From Flash
Hi Folks..

I am playing a SWF in the browser..and i have a EXIT button inside the flash, as and when the user clicks on it the current browser should be closed..is it possible using the JavaScript ?? if so plz help me out in this mind boggling thing..

Thanks in advance
rangachamak

Close The Browser Window
How can i insert a flash movie in a html page with a button to close de browser window?

Is there any way without using flash extensions?
Can use javascript? How?

Thank's./Pedro

Close Browser Window
a really quick questions, if someone can hook me up.

the site im building loads a popup window with a flash site. in the flash site there's a "quit" button. what action script can i use on the button so that when clicked, the popup window closes and the parent window refershes to another url.

thanks

Close Browser Window
I have created a flash site when you click on a pop up window its centered in the middle of the screen. I can't seem to figure out how to close the window when I click in the browser window. You can see the draft of the site at Spirit Beanies click on Samples then Styles choose anyone of the caps. They all appear in the center of the screen. So I want people to have the ability to click on a cap & it closes the previous cap opened or just close the browser without clicking on the X in the upper right hand corner of the browser window.

Thanks in advance for the help.

Deb

Close Windows Browser
Hi there,

I create an button in my flash movie ( embed in browser )

Any action scripts can be used to close the Windows?

Cheers

How Do You Close A Swf Browser Window
In my movie I have a button that when clicked, another browser window is launched. I've figured out how to stop the sounds and movie from playing once the other window has opened, but I'd like to close the swf window somehow, even though it's covered up behind the new browser window that opens infront of it.

Thanks!

Close Browser Window
Hi!

Urm... got another problem again ^_^ I'm trying to close a browser window from Flash. I've tried using "javascript:window.close()", but it doesn't seem to work.

Also, since the Flash movie is in one of the frames, and what I want to close is the whole framepage, would the above code still apply? If not, what is the way to go about this?

Thanks, and sorry for keep asking about javascript =P

Regards,
Russ

Close Button For Browser
I KNOW HOW TO MAKE A BROWSER WINDOW OPEN WITH NO BROWSER ICONS. BUT I NEED TO KNOW HOW TO MAKE A CLOSE BROWSER BUTTON LIKE IN THIS SITE http://www.frosch-studio.com/ AFTER YOU LAUNCH THE SITE LOOK AT THE TOP RIGHT
HE HAS A CLOSE BROWSER BUTTON HOW DID HE DO THAT?WHERE IS THAT COMMAND IN FLASH?OR IS IT HTML AND HOW?

Close Browser Window.....
simple question: the code for closing the browser window that the swf file is in. It will be attached to quit button.

Close Browser Window
It's a simple bit of script I know, but I just can't get it to work.

I've got a "close window" button, but I cant get it to close the Browser window....

I've been trying to adapt this javascript

<a href="javascript:window.close()">Close</a>

Any ideas?

Cheers

Rob

Detect Browser Close
Hi,

Is there any way to get a flash movie to detect wether or not the browser window containing it is still open? I've been searching for a couple of hours now and can't find a darn thing.

Will onUnload do this?! I have a feeling I'm way off on this one.

Thanks in advance!

Close Browser Window...
I was wondering if there's a script I could use to close my current window directly from my flash movie. Can you help me?

How Do I Close A Browser Window
i would like to auto open a pop up window after the client visits the site.
once the pop up has opened how can i shut the browser window down

as always eternally gratefull for some input

Close Browser Window
I have a pop up window, the swf in the pop up window has a button. When clicked I would like it to close the pop up window and go to a page in the main document. I know how to close the window, but not how to go to another page in the main site.

I have tried something like this which obviously doesnt work.

on (release) {
getURL("javascript:self.close()");
}
getURL(../Bundoora/bundoora.html);

Any help would be greatly appreciated

Thank you

How Do I Close A Browser Window?
Erm... really basic question: how do I close a browser window?

I want to have a button in my Flash, that when clicked, closes the browser window.

Any help would be appreciated.

Thanks.


OM

How To Close Browser Window
How can I close a browser window with a button?

How To Close Browser's Window (other Than IE)
Hello everyone !

Well, I used this code on my button and it works perfect in Internet Explorer... however, it doesn't do any good in Firefox and some other browsers (Netscape/Mozilla engine browsers).


Code:
on (release) {
getURL("javascript: window.opener=self; window.close();");
}
Is there anything else that can help ? What I'm trying to do is just simply have a button "trash this page" on the stage, and when pressed it should just completely close the browser's window... not pop up window, but main window where my main SWF plays.

Thanks in advance !
Regards !

Close Browser Window
Hi,

anyone able to supply code for close window button>

Flash MX

Cheers

[F8] Can I Close A Browser From Flash?
Hey,

I was wondering. Is there a command that allows you to close a browser window? I have a small 200 x 200 window that pops up over my site. I'd like to put a button on the flash file to close the browser. Basically a dummy switch for any user who doesn’t understand it’s a pop up. Is this possible?

Thanks,

Loader Does Not Close In Browser...?
Hey...
So I'm doing a flipbook type thing that has to load a lot of images quickly, starting with whatever page the user jumps to and working outward left and right.
If a user flips way ahead in the book, I need to close() any Loaders that are currently running in order to speed up the load of the new page the user's looking at, otherwise these loads pile up very quickly and the whole thing slows way down. (Loaders that have already finished are simply stored in a master array and removed / added to the display chain as needed).

The images that were stopped mid-load are reloaded from scratch if the user flips back; this is forced by adding a random string to the image request.

When testing my SWF from the IDE against images on a remote server, over a slow connection, this works great. The images away from where the user is looking always stop loading, 100% of the time, and the image the user is paged to starts loading up right away.

However, doing it in a browser -- especially Firefox 2.0 -- is another story. For some weird reason, firebug reports that occasionally, sporadically, some of the Loaders that have been closed and unloaded are still trying to load. It's about 20% of the time.

My loader destruction code looks like this:

Code:
try {
close();
} catch (err:Error) {
//
}
if (content) {
content["bitmapData"].dispose();
}
unload();
Prior to this, it's already been removed from the display chain and all event listeners have been killed; what's more, memory checks show the image is being garbage collected. And yet... firefox does not stop the request (not sure about IE, but I suspect something similar).

I'm wondering if anybody's run into this before and what the workaround might be. Maybe some fancy external javascript that could kill the call?

Thanks,
Josh

On Close Open A Browser.
I'd like to open a web page when the html page my SWF file is running out of is closed (to take a survey when the flash program is quit). Would you know how to do that? I could do with a popup browser, but preferably having the URL open up within the falsh program would avoid the issues around popup blocking.

Browser Close Button
Hi all

How can I capture when user click browser close button("X" button) for running flash animation ?

in my case,

If user clicks browser close button then run below script.
sendme.send("http://wwww/update.cgi", 0, "POST");

I am not considering in using java script. just want to know the possibility of controlling browser close button in Actionscript because I need to check the whole time for playing game.

Thank you.

Close Browser Button
This should be a pretty easy task but I can't seem to get it to work. As I said in the subject, I am trying to create the function of closing the browser window that the flash file resides in.

OK-

I have this code on my close button in flash:

on (press) {getURL("javascript:closeme();");

}

Here is the code I also added to the html page:

<script language="JavaScript"></script>[ !-- //
function closeme() {
window.close();
}
//--></script>

However, it doesn't work . Any suggestions??

Thanks,
Dave

Notify When Browser Close
HI,
Is there a way to detect from within a flash movie, that the user has closed the browser?
I want to send a variable to php page when a user is closing the browser.

Thanks.

How To Close A Browser Window
Hello,

I'm trying to figure out what I'm missing! I've added a close button to a Flash Player 8 file that is running in a browser window. When the user clicks the close button I want the browser window to close. The code on my button that I've tried is:

getURL("javascript:window.close();");
and
getURL("javascript:window.open('','_parent','');window.close();");
and
getURL("javascript:window.opener=self; window.close()");

None of these will close either a Safari or a Firefox window, but it works in IE. Am I missing something?

Thanks,


Julia

Close Browser Window
Being honest, I'm rather new to ActionScript, but I've created a slide show of movie clips that is contained in a separate browser from the parent sight. At any point during the slide show, I would like the ability to close the browser window by clicking on the movie clip being shown. My attempt at this (with AS) is as follows:

on (release) {
getURL ("javascript:window.close()");
}

OR

on (release) {
    getURL("javascript:window.opener=self; window.close()");
}

When I test, all I get in OUTPUT are a bunch of errors, and when I import the flash into an actual html file and test, nothing. Would someone please explain what I'm missing? Any help is appreciated.

Thank you in advance.

Close Browser Window
You know if there is a script to close a browser window from flash?

Thanks!

Close Browser Window
You know if there is a script to close a browser window from flash?

Thanks!

Close Browser Window
is there a command that I can use to close the browser window as flash hits a certain frame?

Close Browser Window
I utilized the special effect Launch a Centered Pop-Up Window for Flash MX. I want to go one step further that if there is a button in the pop-up window when you click on the button it closes the browser window or if another pop-up window is launched the previous windows closes.

Spirit beanies click on Samples then Styles choose any cap & you will see the Centered Pop-Up Window. Then if you click on the cap it doesn't close. Can't seem to find the right code to do that piece of it.

Any help would be appreciated.

Thanks

Deb

Close Browser Window?
The site Iam busy with uses javascript to maximise the whole Flash movie from the beginning HTML page.In the Flash movie there is an exit button.How do I get the maximised browser window to close when clicking on the exit button?

Close Browser Window
Hello Everyone,

I am trying to create a button that will close the browser window if clicked.
Does anyone know how to accomplish this?

Thanks in advance.

Close Button .exe Vs Browser
Hey.
what is the solution to that problem of a browser window poping up when you have a close button which is set to close both .exes and web browsers? I have a demo which needs to go web or Cd from the same file. So I put in the standard

on(release){
fscommand("quit");
getURL("javascript:window.close();");
}


so it will close in either case. However, of course, there is a problem with the .exe. The demo closes, then the getUrl runs so as the demo closes it also launces a browser window which it closes. How do I stop it running the getURL after the fscommand("quit"). I know there must be a basic solution to this..... I just can't find it on the forms

Thanks!

Close Browser Window
hi

i am trying to get the browser window that my flash swf file is in to close when i click a specific button within that swf file

i have tried attaching the actions:

on (release) {
fscommand("quit");
}

and i have also tried:

on (release) {
geturl("javascript:window.close()");
}

but i still can't get it to close the window. can anyone help me?

Close Browser Window From A Button?
Can anyone tell me how to close the browser window using javascript when the user presses an exit button?

Thanks
Scott

How To Close A Browser Window Inside Swf.
I can´t use the javascript command (Javascript:close()) in a movie. Any ideas.
I have to present the work today!!!!

How To Close A Browser Window Inside Swf.
I can´t use the javascript command (Javascript:close()) in a movie. Any ideas.
I have to present the work today!!!!

Close Browser Window In Flash 5?
Was wondering if anyone knew a script that would allow a Flash button to close the browser window that it is playing in. Any help, links, ideas would be greatly appreciated.

Thanks

Pesky Pop-up When Trying To Close Browser Window
I have a button in my flash movies that closes the browser window but that Windows dialog box always comes up asking if you're sure you want to close this window or whatever. Is there anyway I can avoid having that come up so it will just CLOSE!?

Is There A Script To Close Current Browser?
I was wondering if there is an action script for closing the current browser window? Any help is greatly appreciated. Thanks!!!!

Copyright © 2005-08 www.BigResource.com, All rights reserved