Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create a pop-up with NO BORDERS, NO MENUS & NO TOOLBARS

Step-by-step tutorial

create a pop-up with NO BORDERS, NO MENUS & NO TOOLBARS

by  davdesign  Posted    (Edited  )
[color green]Just to let you know that I'm relocating my server as of today, and for a period of three to four weeks, none of the links to my files on this site will work.

If you need a file from me which is linked from this site then please just email me details of the relevant link and I will send the relevant file(s) to you.

After I've relocated the server and all the files within it I shall endeavour to update all links in Tek-Tips.[/color]



Well, with IE at least. Netscape will always insist on slamming in a border and X button regardless of what you try and do. Anyway.........

View Sample: www.pinkzeppelin.com/FAQ/250-611/index.html
Download zip: www.pinkzeppelin.com/FAQ/250-611/popup.zip



What you require for this effect:

1. Your flash movie
2. Your Index page (or the page which intiates the whole process)
3. An HTML page containing your flash movie
4. A Javascript file to reposition your pop-up
5. An HTML page containg a self-closing Javscript instruction

1. Creating the Flash Movie
Create your flash movie and note the dimensions of it, you'll need them for the Javascript-ing later on. You shall also require a 'close' button which closes the window containing the movie, otherwise the user shall have to resort to Alt-F4 (not the best solution). So, you've created your movie, you've added a 'close' button, now insert the following actions on the button:

In Flash 5[color red]
on (release) {
getURL ("closewindow.html", "_self");
}[/color]

In Flash 4[color red]
On (Release)
Get URL ("closewindow.html", window="_self")
End On[/color]


2. Creating the Index Page
The Index page is NOT the HTML page you just published for your movie. Your index page is what appears to the user 'behind' the Flash movie, or in the case of users with 2 monitors, what appears on one or other of their monitors. For two monitor users this effect is not limited to a single screen, and does not cause problems associated with other effects.

Within the <HEAD> tags of your HTML insert the following:

[color blue]<SCRIPT LANGUAGE="javascript" TYPE="text/javascript" SRC="[color red]davdesign.js[/color]">
</SCRIPT>
<script>
<!--
var n=navigator.appName
var ns=(n=="Netscape")
var ie=(n=="Microsoft Internet Explorer")
if (ns)
openwinnowin('[color green]ddholder.htm[/color]', ', [color red]500, 207[/color])
else if (ie)
openwinnowin('[color green]ddholder.htm[/color]', ', [color red]500, 200[/color])
else
location="[color green]ddholder.htm[/color]"
//-->
</script>[/color]

Note: Replace the text in red with the name of your Javascript file (see later for this file), assuming it is in the same location on your server as this file.

Note: Replace the text highlighted in green above with the name of the HTML page containg your flash movie here (see next section for creating that page) assuming it is in the same directory on your server as this file.

Note: The figures highlighted in red are the dimensions of your movie, with 7 added to the height for Netscape browsers.

Within the <BODY> tags insert the coding for your background page as you normally would with any HTML page. OK, that's it.


3. Creating the HTML containing your Movie
Easy enough to do if you haven't done it already, just select HTML in the Publish Settings within Flash before you publish your movie. Remember to change the names in the Javascript as mentioned above.

4. The Javascript File
Take the file I've enclosed in the zip, rename it to suit if you require. If you do rename it, remember to change the code in the second step (above).

5. The HTML which holds the javascript to close the pop-up
Just copy the file "closewindow.html" in the zip file and rename as you require. Again, if you rename it remember to change the [color red]getURL[/color] action on your flash button.


OK, you're finished, give yourself a pat on the back.

dave


Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top