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




Closing Browser Window



is there an action that i can place behind a button that will close the browser window that the swf file is playing in, i can do it in the exe format but am having problens with swf & html

Thanks in advance



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-06-2001, 11:05 PM


View Complete Forum Thread with Replies

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

Closing Browser Window
I have a pretty easy question i hope.

I'm trying to make a simple flash application that will open and close the browser window.

To open a URL is easy like

getURL ("http://www.ect");

but how do I close it, say in frame 30?


basically what this application will do is constantly open and close the same URL..that's it


any thoughts on how I can acheive this??

thanks in advance Steve

When Closing A Browser Window .....
Just a thought, but when a user closes the browser, is it possible to display a "thankyou".swf on a timer that will close the browser in a certain amount of time (5 secs).
I've got the timer and the image I want displayed, but havn't a clue about closing the browser.
Also do you think it's a waste of time to do this as it would be infuriating to the user.

Cheers for your time,

vglcrew

Closing Browser Window
How do I make an exit button to close the entire browser window that the swf file originally opened into?

Closing Browser Window
does anyone know how to make a button in flash close the browser window that it is in?

Closing A Browser Window Using JS
Can someone please tell me the action need to be placed in a button, if that button were to close the browser window on release..
I know it can be done in javascript, but I am not sure of the script..

Thanks for your help.

Closing Browser Window.
I am playing my swf file directly into the browser with no html page. I need to know how can I communicate with the browser without the html page. I tried the FSCommand but it needs the html.

I have a button in my movie that I would like for it to close the browser window that contains the swf file.

Thank you
J.

Closing A Browser Window
On an html page, I want to have a button within an embedded swf file to 'quit browser'. Does anyone know the actionscript?

Closing The Browser Window
How can I have a flash button close the browser window?

I created a flash cd rom with an exit button. Now the client is using this on their intranet site and the fscommand("quit") function no longer works. So I want to change the actionscript to close the browser window.

Couldn't they create an invisible button in html or javascript that lies over the flash file that closes their browser window?


Any suggestions?

Thanks

Closing A Browser Window
Can any body tell me plz that, if i want to close a browser window on a specific date. I means that if some one tries to visit the site on which the close brower window script is written, then the browser window should close if it matches the specific date, and should not show the site.

for example, that if in the script the date of closing the browser window is 15th of september, then if some on tries to open the site on 15th september, then the browser window should close.

i will be very thank full to any body who will help me in this matter.

Closing A Browser Window
I am trying to use a button in flash to close a browser window. The window that I am trying to close is a pop up that I previously opened. It is not the same html file that contains the button.
Can anyone help?

Thanks,

Closing Browser Window With AS
how to close the browser window from a flash movie.
the flash help file don't helped me!

valeu!

Closing Browser Window
Helping a Newbie.....

I see plenty of Ways to open Browser windows, but how does ne close a browser window with Flash MX.

I have a flash page that opens ( we can call is start.html )and I want the people to press a button that will fire up another browser with a different HTML file in another window that uses one of the many decriptions of how to do that so that I can control the size and options of the second window... but.... I also want it to then close the first window ( which is the start.html file)

Any takers?

Closing A Browser Window
Does anyone know how to make a browser window close upon a click of a button?

I want to make a pop up close once they have made their selection which loads in the main browser window.


thanks!!

Closing A Browser Window
This actionscript works on a mac but not on a pc. It's supposed to close the window once a button is clicked:

getURL ("javascript:self.close()");

Closing Browser Window...
Hi!

I was wondering how I would go about having a flash button close the browser window it's residing in.

Thanks in advance!

Closing A Browser Window?
I've got large images opening up in seperate windows within my site. How do i put a button in close a browser window?? This is what i've tried (attatched) using the fscommand which works for a projector but not for a browser any help would be great...cheers

Closing The Browser Window
hey guys just wondering if anyone knew of any way that you could through javascript or actionscript make an animation play within the flash movie when the user clicks on the close button in the browser window.

any ideas would be awesome

cheers

Closing A Browser Window?
Hey all
As I am building a site with flash..
I was wondering How could I make an actionscript for a button
That on pressing it, it will close the current window opened?

Thanks alot

Closing A Browser Window
I'm wondering if I have a main.swf that has a button with a getURL code to load a box.swf; can I somehow close the browser window that main.swf opens in? because if I click between main.swf and box.swf a new browser keeps opening up.

Please help.

Thanks,
Tri

Closing A Browser Window
Does anyone know the coding to close a browser window from a button? I've seen it on a couple of sites, and was wondering how they did it.

the DRS

Closing Browser Window With Flash 4
I know how to do it using javascript with flash 5 but i only have the flash 4 version. Is there a way to do it with flash 4 because when i try it with the script that someone said in the Flash 5 forum. it didn't work.

btw, this was the script to put in the getURL action:
javaScript:window.close

Closing A Browser Window Using Flash?
Well....how is it done? Basically...what's the javascript I need?

I have a movie here and I will have to provide a close button or novice computer users will have a breakdown.

- Matt

Closing A Browser Window Using Actionscript
how do you close a browser window using action script?

Closing Browser After Opening New Window
How do I close a browser window that has just spanwed a new window?

Closing A Browser Window Within Flash
can any help please with the following..


on (release) {

//what code do i put here to close the browser in which the flash movie is embedded into.

}


thanks

mtt_dkyn

Detect Closing Browser Window
Hi all,
the problem is this one: i want my flash movie capturing browser windows client closing, to call an actionscript function that is calling a javascript function in the HTML page.
Is this possible?
Or the same problem, but in another way:
I think that once browser is closing its own window, tells flash movie to stop, and then unload it.
Is it possible for Flash to detect that "STOP"?

I need it for AICC.
Really urgent and important.

Thanks a lot.
Bye
AlX

Closing A Main Browser Window
I'm loading (onload) .swf files into an html shell. The shell holds my Flash exported SWF file, which is embedded in the html file, so, I have buttons on the top of the html page for resources, etc. I also have a link to EXIT. I'm trying to figure out how to close this main browser window using a button action. Is this close:

Header of HTML shell

<head>


<script language="javascript">
<function closewindow()

if(window.parent!=window){
window.close = function() { window.parent.close(); }}

</SCRIPT>


</head>


---------

BUTTON in Flash:

on (release) {
getURL ("javascript:javascript:closewindow();");
}

Closing Window When Audio Is Done And Opening New Browser..
I am using Flash MX. I have a 35 second piece of Audio that I imported into Flash and there is an Image there as well. The Flash is launching once the HTML page opens...it plays the audio. When the audio ends, I want the window to close and open up a new page. Can someone tell me how to do this?

I have the audio on one layer, the image on one layer and they are both in Frame 1 on seperate layers. Can anyone help?

Thanks!

Closing A Browser Window With A Flash Mx Button?
I am looking to spawn a new browser window to play my flash in and then have an "exit" button in flash that will close the entire window. I know how to make the button close the projector.exe but not the proper command to have it close a browser window. Probably a very simple solution, I appreciate any help, thank you in advance.

Grrr... Closing A Browser Window Using FScommand
Hello,

Could someone please tell me, how does one close a browser window using the FSCommand. The normal 'quit' option works only closes a projector file. But i need to close a browser window.

I hear there is some technical javascript wizadry which allows one to do this. Please help....

Thank Ye,
Gopaldass

Handle Browser Window Closing In Flash
Hey y´all!
Working on a flash poker game and I wonder if there is any way you can create a popup launcher that detects if the user tries to close the browser window. Right now the user can close the window and therefor lose the current round, isn´t very user friendly. So anyone know how to detect window close in flash?
Would be greatful for any suggestions!
Peace

Grrr... Closing A Browser Window Using FScommand
Hello,

Could someone please tell me, how does one close a browser window using the FSCommand. The normal 'quit' option works only closes a projector file. But i need to close a browser window.

I hear there is some technical javascript wizadry which allows one to do this. Please help....

Thank Ye,
Gopaldass

Sound Loop Continues After Closing Browser Window
I have the following actionScript on the first frame of my main timeline:
waves = new Sound();
waves.attachSound("waves");
if(!mute){
_root.waves.start(0,100);
}

Detect When Flash File Ends By Closing Browser Window
Okay, this one was hard to explain in the title.

What I want to do is know when a user hits another web address or closes the browser window so that I can write out the session ended information to a database. Is this possible? I write to the database when the swf file is started, and can write to it if I hit an end button within the swf file, but my concern is - what if someone doesn't hit the end button and just closes the browser. Can that be captured from flash or some other script?

Thanks for any help.

Popup Window Closing To Main Window?
I can close the popup window of my flash intro, but I want to go to another html page in the main window of my site.
Can anyone help me? Thanks.

Closing Window - Javascript:window.close();
Hello all

I'm trying to use the getURL("javascript:window.close()"); code on a button to close my HTML window. But after I publish the file if I click on the button nothing happens.

Does anyone have any idea what is going wrong? Do I need to add another file to the folder where my SWF file sits? Or is there an Internet Explorer setting or something that is disabiling this?

Thanks
MMH

Closing Browser?
does anybody know how I can close a browser window from within flash?

About Closing The Browser
Does anyone know how to close the browser by a button in flash,i mean IE or netscape,but not the swf itself,i know to use FSCommand to close the swf file but i cant close the browser after insert into the html page.(i need to close the browser)
Need advise.

Closing Browser
Hi,

In my flash movie i have a button that loads another movie in a new browser.
How can i create a button that will close this new browser(movie), once i've finished with it.
Does anyone have the action script for this?

Thanks

Closing The Browser
I know this is easy but I'm just crap with scripting!

I'm looking for the script that would go on a button in a flash movie that will close the brower window that the flash movie is being displayed in? (Flash movoe is embeded in a HTML page)

Thanks to any one who can help!????

Jiggystar

Closing Web Browser
I want to close the web browser from a button that is on a movie clip opened in the page in the browser (bad English ..sorry) ...close the browser from a button in a swf file.
I know that it is done using Java Scipt ...but I don't know how ....

XML And Closing Browser Windows
I have a Flash/XML chat room with a couple of simple multiplayer games. Everything works fine but for one thing:

When someone closes the browser window rather than pressing the "quit" button, it does not register that the user has left - if they were in a game, the game still thinks they are in the game. As you can imagine this is causing a few problems.

So, basically I need a way to call the function that is called when the "quit" button is pressed, but when the browser window is closed.

Does anyone have any ideas how I might accomplish this?

Many thanks,

dominion.

eeep - sorry, wrong forum. I'll repost this in the XML forum. Could a mod delete this please? Thanks.

Closing A Browser Through Flash
I have made a program in flash that opens a browser every 30 minutes (don't ask why)

I need to know if there is a way I could close this browser 1 minute or so after it opens, so I don't have 30 browsers stay open overnight...would i be able to do this in flash or vb?

Thanks in advance

Closing A Browser With Script...
I want to click on a button that will make a pop-up which I already have but the old browser to close with the button? What is the script, anyone know... If I'm not being clear then check out www.soe-squad.tk and you will see what I mean...

Closing Browser Windows
Hi I just want a button on my flash movie to close the browser instance. Does anyone know what this is keeping in mind that I need to export this swf as a flash five swf.

Closing A Browser From Flash
Hi, I'm trying to close the browser from the flash movie it holds.
I'm trying to do this from a frame in the main timeline with flash 5.
Is this possible at all? Help greatly appreciated!

Thanks,

framesix

Closing Browser Windows
Hello,
I am using pop-up windows to show enlarged views of images. Can you tell me how to use a button within the pop-up window to close the pop-up window? I am using Flash MX. Thank you.

Closing Web Browser In Flash 8?
Hi all. I have a quit button in my Flash piece. Here's the code that runs when the button is pressed:


Code:

//Define the "funcCloseQuiz" function:
function funcCloseQuiz() {
fscommand("quit");//quit from CD
getURL("javascript:window.opener=self; window.close()");//quit web
}
This closes the SWF when running through the standalone Flash player but does not work when the SWF runs through a browser. This is probably a security issue with new browsers as the sample code I'm using was for Flash 5 or 6 I believe.

Any suggestions?

Thanks.

AS3: Browser Closing Interruption
Having issues with this AND maybe this isn't the precise location for this post. But anywhoooooo...

I have an AS3 application that utilizes both Local Shared Object and/or server calls to save user preferences. So I want to be able to save when the user closes the browser window. I looked into the javaScript onbeforeunload event and that works great except I have to use an js alert to pause the closing mechanism.

What I would like to do is this:user initiates a browser close
onbeforeunload calls a js function
js will see if a boolean is false, if so then calls swf function to save prefs, else will close browser
swf function onSuccess or onFail will talk back to another js function
js function2 will set boolean to true and call js function 1
js function1 will see that things are saved and closes
Am I asking too much from js? too much from AS3?

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