|
||||||
|
||||||
Flash - Pop Up Windows

Free Flash Pop Up Tutorial
Step Three: Middle Button Script
Example: Download the Flash file Int 112a
Click the buttons to see the Pop Ups.
The code in this button is nearly the same as in the previous button but there are some important differences:
on (release) {
MovieClip.prototype.openWin2 = function(url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL("javascript:var myWin2; if(!myWin2 || myWin2.closed){myWin2 = window.open('"+url+"', '"+winName+"', '"+"width="+w+", height="+h+", toolbar="+toolbar+", location="+location+", directories="+directories+", status="+status+", menubar="+menubar+", scrollbars="+scrollbars+", resizable="+resizable+", top='+((screen.height/2)-("+h/2+"))+', left='+((screen.width/2)-("+w/2+"))+'"+"')} else{myWin2.focus();};void(0);");
};
address = "pop2.htm";
winName = "window2";
width = 200;
height = 200;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
openWin2(address, winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
Note: If you do not change the Function, Window, and Variable names, the Pop Ups will not work correctly. You do not need to change the web page but normally you would. I have made the following changes:
The last button has similar changes. The beauty of this script is that you can have as many Pop Ups as you want, locate them where you want on the screen and all the script is contained in one place. No need to go scurrying around in the HTML to add bits of JavaScript. This makes it so much easier to update or move the Flash Movie to a new web page.
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
|
|
|
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|