Opening pop-up in loop problem

Hello everyone,

I want to open 2 pop-ups from two images dynamically loaded
images on my main timeline (pop1.html and pop2.html).

The pop-up opens but there is no content…
The problem must be somewhere near the
*** address = “pop”+i+".html"; ***
line but I don’t know why :puzzled:

If i = 1, then it’s suppose to read “pop1.html”
and in the next loop, “pop2.html”, no ?:pa:

Here is my code :

// pop-up
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);");
}

// Import images
x = 276;
y = 85;
for (i=1; i<3; i++) {
        this.createEmptyMovieClip("clip"+i+"_mc", i+3);
        this["clip"+i+"_mc"].createEmptyMovieClip("photo_mc", 0);
        this["clip"+i+"_mc"]["photo_mc"].loadMovie("image"+i+"_s.jpg");
        this["clip"+i+"_mc"]._x = x;
        this["clip"+i+"_mc"]._y = y;
        
        x += 240;

        this["clip"+i+"_mc"].onRelease = function() {
                
                // PROBLEM IS HERE !!!!
                address = "pop"+i+".html";
                target_winName = "News";
                width = 440;
                height = 480;
                toolbar = 0;
                location = 0;
                directories = 0;
                status = 0;
                menubar = 0;
                scrollbars = 0;
                resizable = 0;
                
                openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
		};      
}

=========================================================

Any ideas would be greatly appreciated.

Thanks! :beam:

neuhaus3000