Flash :: POST To Opened Javascript Window And Have Close The Window
Nov 30, 2011
I created a Flash application that reads POST data from a form. A user clicks the button, and the data gets posted to the flash app in a new window (_blank). Now takes the data and then spins a wheel to give users a prize. If they don't win a message pops up letting them know they didn't win. If they don't win, clicking the OK button needs to close the browser window.
I've tried a number of solutions and it seems that the only way to get this done is to launch the window with javascript and then use ExternalInterface.call('window.close'); to close the window from within the Flash actionscript (3) because otherwise the window won't close (I've tried just using window.close and window.close() with no luck)
I understand how to launch a new window with javascript, but I don't know how to simultaneously launch and POST data to that window (the Flash application has to have the POST data. Is this the best solution? Is there a way to close a browser window easier than what I'm describing?[URL]
View 1 Replies
Similar Posts:
Feb 24, 2011
I have a webpage (popup) with flash content. When a user clicks a button inside the flash content, it opens up another browser popup window. Next, I need to close the window with flash content from the newly opened popup window through javascript.
The problem is that the window.Opener is null as the popup is invoked inside from flash content. Moreover we dont have access to flash (.FLA) file.
View 1 Replies
May 28, 2008
I cant seem to find the solution to call the javascript:window.close() function.It is running locally so there may be some issues on that front.Has anybody used this type of functionality before. it is doing my head in.
View 3 Replies
Jan 9, 2012
The only way I have found so far to capture the browser window close event from actionscript/flash is actually to capture the event in javascript, and then use a javascript/flash data passing from the javascript callback.
Something around those lines:
window.onbeforeunload = clean_up;
function clean_up()
{
var flex = document.${application} || window.${application};
[Code].....
View 1 Replies
Mar 4, 2006
I have an asp page that will open a new asp page in a new window that contains a swf file with a button.hen the user clicks the button i want to close that window and reload the parent window.
View 9 Replies
May 21, 2004
In Flash, I programmed a directions html page to close when a link is selected.However, it asks if you are sure if you want to close the page.Well, my audience will probably hyperventilate if they see that pop-up.Is there a way just to hard close a html window without the pop-up message?Also, are there any good tutorials out there combining Flash and Javascript?
View 6 Replies
Nov 17, 2011
I have my html where I embed third-party flash video by means of iframe. When I click play on the video a popup is opened. I was wondering id there is a way to add a javascript function to my html that would close such a popup immediately when it is opened?
View 1 Replies
Mar 23, 2007
*let say i have a mc called A. it can call a MC with an instance name called window_btn.window can be drag and double click.i want to put a close button in the window MC to close the window.
how to call the close button in the MC?
View 14 Replies
Sep 25, 2009
I'm trying to create a pop up window in Flash which also fades the background window to 75% black. When the user closes the pop up window, I'd like for the parent window to un-fade back to normal. Is this possible? I can do the first half of it and make the background window fade to 75% black. The difficult thing is making it fade back to normal when the user closes the pop up window.My thoughts are that I need to attach some code to the browser's built in close window button. It might require some javascript or a fscommand. I'm not sure.
View 9 Replies
Feb 6, 2003
ACTUALLY i just thought of another one so now i have two. sorry. hope you don't mind. i get sidetracked rather easily. before i start, a quick nota bene. i'm a complete newcomer to flash so my questions are very simpleminded. not much of a challenge i'm afraid.
1. can i put a link in my movie that will close the window?
2. can i put a link in my movie that will open a new window of a specific size, and without the menu-buttons of explorer?
View 10 Replies
May 30, 2007
No matter what I do I cannot get this to work.All I want is a button in flash that will close the browser window. It's a popup window so it should be able to be closed.
View 11 Replies
Apr 20, 2011
i need to track the mouse movements(and register what component is under the mouse), it is done already, but i meet new problem, if click right button then context menu will be opened and no any new events(mouseMove, mouseOver) received by my components. I understand that this context menu is more browser then flash/flex and afaiu the is no way to disable context menu at all. So may be somebody know any trick to avoid this events blocking?
View 1 Replies
Jul 31, 2009
What is the actionscript required to close a Flash player window? I want to run a flash movie on my computer that has a button which closes the window, but in Actionscript 3 I cannot add actions to the button.
View 4 Replies
May 26, 2005
anyone care to post the code used in flash and the one needed in the document to close the window. can be done with javascript and fscommand or what ever its called right?
View 3 Replies
Jun 7, 2010
Why does Flash CS5 quit when you close the window you were working in? It has to restart every time you close and open a file.
View 3 Replies
Mar 11, 2010
I simply want to close the browser window from Flash. The browser window may or may not be a popUp window.
This is what I have, but it is not working:
ActionScript Code:
public function closeBrowser(e:MouseEvent):void {
var req:URLRequest = new URLRequest("javascript:window.opener='x';window.close();");
navigateToURL (req);
}
View 7 Replies
Oct 6, 2006
Im currently working on a lite fix to ease the closing function of the popup windows in a flash presentation to our customers.Right now i have used the Flash Window component, and the close button in the right corner are the only way to close the window. But are there some way possible to make it possible to close the window by clicking inside off it?
here are the AS code:
Code:
function open_popup(page_url, pageNumber) {
if (zoom_win != undefined) {
return;
[code]....
View 1 Replies
Jun 10, 2011
how to close the browser from the flash window?
View 1 Replies
Mar 18, 2010
I'm trying to simply close a Browser window from within flash... code below:
Code:
closeButton_mc.addEventListener(MouseEvent.MOUSE_UP,closeWindow);
//
function closeWindow(p_evt:MouseEvent){[code]....
When the button is clicked, the code seems to open a new browser window then close it immediately, looks like a flicker on the screen.
View 5 Replies
Jul 6, 2007
I've used script -[URL] to open a centralised window on the release of a button. It works brilliantly but how to change the background colour of the opened window to black. I'm no programmer so don't really have much of a grasp of Action or Java script but having looked on the web, I think what I need to do is use document.bgColour('#000000') somewhere in the script but have no idea where to put it or even if it's right!
View 1 Replies
Jan 5, 2012
I have been created Flash Presentation for my client. I woun this presentation. But It will show only when user close the presentation. And it will appear for 20sec. and then disappear. I have did this in Macromedia Director few years back through lingo scripting. But I'm don't have much experiec in Flash. So I don't know whether it's possible OR not?
View 5 Replies
Jan 11, 2004
I want to make an actionscript where, at the end of my Flash-movie, the Flash-window will close 'automatically' after the getURL-action is performed. Can someone tell me how to do this?Like, in the last frame, I got so far:
stop();
getURL("http://www.somewhere.com");
View 5 Replies
Jan 11, 2004
I want to make an actionscript where, at the end of my Flash-movie, the Flash-window will close 'automatically' after the getURL-action is performed. Can someone tell me how to do this?Like, in the last frame, I got so far:
_______________________________________
stop();
getURL("http://www.somewhere.com");
_______________________________________
View 5 Replies
Feb 28, 2005
I am creating just small media player which functions like play, stop, volume slider etc. In this I have to give full path for playing a song. I want to open the window (like window opend at the time of attaching any file to mail).
View 1 Replies
Nov 25, 2009
I have an html page with a link that loads a popup window. The popup includes a simple Flash movie. Some basic Javascript code in the html file was used to produce the popup window. What Im trying to do is have a button that I created in the Flash app close the Flash movie and the popup window.
View 2 Replies
Feb 19, 2007
is there a code to close the flash player window from a button in the flash movie? i want to run a movie full screen then have a button in the flash movie close the window when the people are done viewing it.
View 2 Replies
Sep 13, 2004
Does anyone know the syntax for closing a swf window using a button, similar to closing a popup window? I am creating a small game, and am giving the user the option to "play again" or "quit" at the end of the game, so i want the quit button(standard library on(press)) to close the swf file.
View 2 Replies
Aug 31, 2010
I have an .exe with a button that opens an outside .swf. I want to include a close button on that .swf that closes just that outside movie. I tried:
on (release) {
fscommand("quit");
}
But that closed the whole exe.
View 1 Replies
Apr 1, 2010
I'm currently working with a flash movie that opens up an IE browser to an external link.Since I'm working with a presentation that plays automatically after a few seconds and keeps loading new IE browsers with different links, I was wondering if there was a way with AS2, i can have flash close the IE window it opened?
View 1 Replies
Mar 7, 2011
I am using Flash builder 4 to build a flash. I 'd like to add a button that user can close the window
[Code]....
View 2 Replies