Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-31-2003, 07:58 PM   #1
abacsalmasi
Registered User
 
Join Date: Jan 2003
Posts: 116
Default close window.

Here's my problem. I have a splash page with an enter button that goes to my site. On the enter button I had a java script that would close the first window and open a new window for my site that had the right page size. It worked when I tested it from home but other people couldn't get past the first page, they would get an error about opening a new window or something like that. My queston is is there any other way to close browser windows? If I have the first window open it realy slowes down the playback in the new window so I need a way of closing the first window. Any ideas?
abacsalmasi is offline   Reply With Quote
Old 02-02-2003, 03:32 AM   #2
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

The only way I know of is through JavaScript. If the window has been popped up it shouldn't give any notification before closing but if it's just a standard sized browser window it will prompt the user before closing the window.
ActionScript Code:
on (release) {     getURL("javascript:window.close()"); }
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 02-02-2003, 06:46 AM   #3
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

getURL("javascript:window.opener=self; window.close()");

No prompt!
oldnewbie is offline   Reply With Quote
Old 02-02-2003, 06:50 AM   #4
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

Oooh tricky
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 02-02-2003, 10:30 AM   #5
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

Quote:
Oooh tricky
and nice
__________________
‚€* GOD Is Near ‚€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Old 02-02-2003, 12:49 PM   #6
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

Someone bookmark this thread
Keywords: close window no prompt
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 02-02-2003, 01:40 PM   #7
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

jesse, how comes that when writing the word "javascript" in a post between AS /AS tags, a space is placed between "java" and "script" automatically?
grtz
tost
tost is offline   Reply With Quote
Old 02-02-2003, 01:41 PM   #8
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

test

ActionScript Code:
javascript

javascript


ActionScript Code:
on (release) {         getURL("javascript:spawnWindow('any.html','winName','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=346,height=5         30')"); }


the space between java and script appeared automatically in the third case, this is the same without AS tags:

on (release) {
getURL("javascript:spawnWindow('any.html','winName ','toolbar=no,location=no,status=no,menubar=no,scr ollbars=no,resizable=no,width=346,height=5
30')");
}

hmmm...

Last edited by tost; 02-02-2003 at 01:45 PM.
tost is offline   Reply With Quote
Old 02-02-2003, 01:43 PM   #9
Jesse
ActionScript.org Founder
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: New York
Posts: 8,736
Default

That's something to do with vBulletin I think. Security issue? Not sure.
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 02-02-2003, 01:51 PM   #10
tost
my pleasure
 
tost's Avatar
 
Join Date: Apr 2002
Location: gent.be
Posts: 792
Default

It's for certain a lot of people copy and paste the space in their files. better warn the locals
tost is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:50 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.