This tutorial will show you how to cause new browser windows to open up via javascript in your flash movie. You can adjust many aspects of the new browser window with this script.
·
Create a button
open the actions pallet and choose "get url" action
1) Place the following code into the "URL" field.
| javascript:resizeWindow('http://www.myurl.com', 'windowName', 'height=360, width=800, resizable=0, status=yes, scrollbars=yes, toolbar=0, location=0, directories=0, menubar=0, left=80, top=100') |
The
following describes what the above code mean and what your options
are.
• windowName = name this window whatever you wish. If you use
the same window name for different pop up windows on other buttons
they will replace each other. If you name them differently they will
pop up as separate windows..
• Toolbar = tools, menubar=file, edit, view, insert, etc. (good
if you want them to be able to print)
• Left, top = places the window on the screen by this many pixels.
• Directories= not really sure,,,,it's a side menu of stuff
to the right of the menubar (basically links to hotmail and other
stuff you don't need)
• Location= url address your are presently at…….(the
input address area)
2) Be certain to leave the "window" field empty…..just leave it blank, otherwise this script will not work.
Now that you have placed the "get url" action onto the button itself, you must add this final script to the <head> tags of the html page which houses your flash piece.
| <script
language ="javascript"> function resizeWindow(theurl, windowname, features) {window.open(theurl, windowname, features);} </script> |





