-
Here it is - the code to pop a new window in a single step:
For Flash 5 - put this in your button:
on (release) {
getURL ("javascript:window.open('http://www.flashkit.com','NameofWindow','width=800,height =600,top=0,left=0'); void(0);");
}
Change the URL, window size, position, etc. to your specs...
For Flash 4 - put this in your button:
On (Release)
Get URL ("javascript:window.open('http://www.flashkit.com','NameofWindow','width=800,height =600,top=0,left=0'); void(0);")
End On
Again, change the URL, window size, position, etc. to your specs...
Thanks for this script goes to Polar Lights Studios (www.polar-lights.com) who gave me the initial code to modify!
[Edited by GreatGooglyWoogly on 02-18-2001 at 09:52 PM]
-
Hi . . . you mean you don't have to put the JavaScript function in your html page?? or am I misunderstanding you?
-pigghost-
-
That is correct - no need for javascript in your HTML file - just put this script into your button and VIOLA!!!
-
That's fantastic! Thanks GGW . . . life just keeps getting easier . . .
-pigghost-
-
-
INSTA-TUTE?
O.K. I copied the javascript and put it in my button, but it didn't work! I changed the URL to my specs and typed all that code into the URL box, set the window for _blank - but all that came up was a new browser window with all that code in the address bar...h-m-m-m, any ideas what might have gone wrong??
Thanks!!
-
Former Employee of Satan
GGW,
I've tried to use this in a standalone application, and it works to an extend. The window opens at the defined size - but before that it opens a normal browser window.
-
Originally posted by Napalm
GGW,
I've tried to use this in a standalone application, and it works to an extend. The window opens at the defined size - but before that it opens a normal browser window.
If you have a "_blank" set for your window type - remove it. The java command opens the window - the _blank in there will also open a tertiary window that you don't need.
-
Hi, I've put the script in to my file & it opens the window fine but the main flash page then disappears and all the page reads is [object] Do you know why this might be?
-
Originally posted by designbyv
Hi, I've put the script in to my file & it opens the window fine but the main flash page then disappears and all the page reads is [object] Do you know why this might be?
Is the Void statement in your code? Not having the Void statement, or having it done improperly, is what usually causes the content of your original window to go away.
Keep playing with it - it does work.
-
GGW you are the man! That is thinking, and I thank you for sharing.
Sincerely,
George Bonnes
-
I've done what you said and it didn't work.I think I'm doing something wrong.
What I want to do is to open a .swf file in a new window.
That's the code I wrote:
on (release){
getURL("javascript:window.open('mymovie.swf','Name ofWindow','width=640,height=375,top=0,left=0'); void(0);");
}
What do I have to put where it says 'NameofWindow'?.
Thanks.
-
Again: Open an Absolute Link: Use the http:// and the http://www.and the YOURSITE.COM/YOURPAGE.HTML.
Also, I recommend opening the HTML file rather than the SWF - it is more stable that way.
Seems like a lot of peeps are having a hard time making this work, so here is proof:
[swf width="100" height="40" background="#FFFFFF"]http://www.jadrienbell.com/Footer/OpenWindow.swf[/swf] .
And, here is the FLA file too for download:
http://www.jadrienbell.com/Footer/OpenWindow.FLA
Hopefully that will help everyone!
-
Thanks very much!
I have tried a lot of think before, and I confirm IT DOES WORK.
Congratulation GGW.
However, I have another request for you:
how from that window open another movie or htmlpage whatever, in the previous window, I have tried window="top", but it does not work.
Impress me again please !!
-
Senior Member
Here is a nasty twist!
How do you do this for a projector(.exe) on a CD? Is it possible? If so, how??? HELP!
-
Hi.....it should work exactly the same as on a regular website...I know when you have a javascript function in your html and call it...it works from an .exe, because you're still calling to a browser...I would assume this would work, also.
GGW...this thread should be permanently attached to the top of General Help and F5 General Help...it's got to be the most asked question......and no one seems to use "Search".
Just a thought........
To the top........
-pigghost-
-
*bump*
i agree! i downloaded the fla. and it works great in I.E, but when it comes to netscape it opens a browser window b4 it opens my browser with the defined size. is there a way to by pass that?
peace, 1lOvE
rYaN
-
The way I was doing this before involved calling the function from flash and declaring it by hand in the html of the calling movie. This is much more elegant. The only thing I haven't figured out is how to keep the popup on focus. When the user clicks the main browser without closing the little window and then try to click the button to get it again, it remains behind the big one. Can that be fixed with this direct method?
-
where is _blank
You mention above :
If you have a "_blank" set for your window type - remove it. The java command opens the window - the _blank in there will also open a tertiary window that you don't need.
I have the third window opening up too ... where is this _blank ??? -- i can't find it
Thanks
-
There are many problems facing the user of Netscape browsers...and these are mounting daily as the world moves on. Meanwhile, Netscape remains firmly rooted in the past...and believe me, I say this as a former lover of the product driven to avoidance and abhorrence.
Netscape is NOT reliable when it comes to opening new windows with specific sizes. There are so many variances between the different version numbers that it behooves the developer to avoid the trick entirely, IF THEY ARE CONCERNED WITH NETSCAPE.
In my opinion, there are many users who use the horrible thing still, but FACE IT...those are the ones who never fail to hit the skip intro button. Remember too, they are likely to have very mortal processors, and ANY motion you try with Flash will be rendered unwatchable...
[Edited by Putney Swope on 02-10-2001 at 12:36 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|