Popup Window In Flash

I went through the tutorial on this site that shows you how to launch a popup window, from Flash, that is centered. The only thing is that I would like to be able to open multiple windows so customers can compare many different products. I tried a few things but can’t get it to work, PLEASE HELP!

did you try adding a _blank? that would make it so that its anew windo every time…

Yeah, it didn’t work. Here is the link to the tutorial and code I used, well similar.


Someone suggest changing the target_winName for each instance but that didn’t work either.

Ok it’s an easy stuff… all you need is a html file that will be loaded when you click on a flash buton…

Suppose you call your html file : load.html
on the first frame of you fla use this code

Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL (“javascript:var myWin; if(!myWin || myWin.closed){myWin = 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{myWin.focus();};void(0);”);

then on the bouton that will be use to load you html file (load.html)

on the action use this code :

on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “http://www.yourdomain.com/load.html”;
target_winName = “kirupa”;
width = 400;
height = 300;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);

Bingo !!!

It should work now !!!

That is what I’m using but you can only upon 1 window at a time.

hmm i dont know then… sorry