# Need help with XML image gallery to open up popup in new window

**URL:** <https://forum.kirupa.com/t/need-help-with-xml-image-gallery-to-open-up-popup-in-new-window/188571>\
**Category:** Uncategorized\
**Created:** [May 9, 2006, 4:22am UTC](https://forum.kirupa.com/t/need-help-with-xml-image-gallery-to-open-up-popup-in-new-window/188571 "2006-05-09T04:22:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webguync](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/webguync/32/2434_2.png) [@webguync](https://forum.kirupa.com/u/webguync)\
**Post date:** [May 9, 2006, 4:22am UTC](https://forum.kirupa.com/t/need-help-with-xml-image-gallery-to-open-up-popup-in-new-window/188571/1 "2006-05-09T04:22:54Z")

</div>

I need to edit some AS which loads an external XML file, except instead of loading the image into the stage, I would rather have the click to the popup image open up a new window (either .swf or html).

xml structure is :

\<images\>  
\<thumb\>image\_01.jpg\<thumb\>  
\<big\>big/image\_01.jpg\</big\>  
\<pop\>popup/image\_01.jpg\</pop\>  
\</images\>

here is the present AS code:

////////////////////////////////////////////////Load XML var global  
\_global.clickvalue = “”;  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = [];

xpos = [];  
ypos = [];  
big = [];  
pop = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image = xmlNode.childNodes.childNodes[0].firstChild.nodeValue;  
big = xmlNode.childNodes.childNodes[1].firstChild.nodeValue;  
xpos = xmlNode.childNodes.childNodes[3].firstChild.nodeValue;  
ypos = xmlNode.childNodes.childNodes[4].firstChild.nodeValue;  
pop = xmlNode.childNodes.childNodes[2].firstChild.nodeValue;

}  
firstImage();  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images.xml”);  
/////////////////////////////////////  
p = 0;  
function firstImage() {  
if (loaded == filesize) {  
\_root.movie.mov.buttonleft.thumb1.picture.loadMovie(image[0], 1);  
\_root.movie.right\_big.big.bigpic.loadMovie(big[0], 1);

var dup:MovieClip = null;  
for (j=1; j\<total; j++) {  
dup = \_root.movie.mov.buttonleft.thumb1.duplicateMovieClip(“thumb”+(j+1), j);  
/////////////////////////////////////  
/////////////////////////////////////  
dup.picture.loadMovie(image[j], 1);  
dup.\_x = xpos[j];  
dup.\_y = ypos[j];  
}  
}  
}  
function picture\_num() {  
current\_pos = p+1;  
pos\_txt.text = current\_pos+" / "+total;  
}  
function setbigimage(a) {  
var b = a;  
var index = b.substr(5, a.length);  
// trace(index);  
\_root.movie.right\_big.big.bigpic.loadMovie(big[index-1]);

trace(description[index-1]);  
//trace(big[index-1]);  
// \_root.movie.mov.buttonleft.thumb1.gotoAndStop(1);  
}  
function setpopup(f) {  
var b = f;  
var index = b.substr(5, f.length);  
//trace(pop[index-1]);  
\_level0.popuploader(“popup”);  
\_level3.loadpic.loadMovie(pop[index-1]);  
}  
stop();

any help on what to change to get a new window to open up onstead of within the stage?
