# Trying to get " url " to work in my scroller/ gallery

**URL:** <https://forum.kirupa.com/t/trying-to-get-url-to-work-in-my-scroller-gallery/241477>\
**Category:** Uncategorized\
**Created:** [October 14, 2007, 8:59pm UTC](https://forum.kirupa.com/t/trying-to-get-url-to-work-in-my-scroller-gallery/241477 "2007-10-14T20:59:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![treybraid](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@treybraid](https://forum.kirupa.com/u/treybraid)\
**Post date:** [October 14, 2007, 8:59pm UTC](https://forum.kirupa.com/t/trying-to-get-url-to-work-in-my-scroller-gallery/241477/1 "2007-10-14T20:59:00Z")

</div>

please take a look at my action script and xml… ive got all the fields working except for the " url " … what adjustments do i need to make to get the url for each pix to work…

thanks…trey

delay = 3000;  
//-----------------------  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = [];  
title = [];  
headline = [];  
description = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
title\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
headline\* = xmlNode.childNodes\*.childNodes[2].firstChild.nodeValue;  
description\* = xmlNode.childNodes\*.childNodes[3].firstChild.nodeValue;  
}  
firstImage();  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images.xml”);  
p = 0;  
this.onEnterFrame = function() {  
filesize = picture.getBytesTotal();  
loaded = picture.getBytesLoaded();  
preloader.\_visible = true;  
if (loaded != filesize) {  
preloader.preload\_bar.\_xscale = 100\*loaded/filesize;  
} else {  
preloader.\_visible = false;  
if (picture.\_alpha\<100) {  
picture.\_alpha += 10;  
}  
}  
};  
function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
title\_txt.text = title[p];  
headline\_txt.text = headline[p];  
description\_txt.text = description[p];  
picture\_num();  
slideshow();  
}  
}  
}  
function prevImage() {  
if (p\>0) {  
p–;  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
title\_txt.text = title[p];  
headline\_txt.text = headline[p];  
description\_txt.text = description[p];  
picture\_num();  
}  
}  
function firstImage() {  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
title\_txt.text = title[p];  
headline\_txt.text = headline[p];  
description\_txt.text = description[p];  
picture\_num();  
slideshow();  
}  
}  
function picture\_num() {  
current\_pos = p+1;  
pos\_txt.text = current\_pos+" / "+total;  
}  
function slideshow() {  
myInterval = setInterval(pause\_slideshow, delay);  
function pause\_slideshow() {  
clearInterval(myInterval);  
if (p == (total-1)) {  
p = 0;  
firstImage();  
} else {  
nextImage();  
}  
}  
}

and here is my xml…

\<?xml version=“1.0” encoding=“utf-8” standalone=“yes”?\>  
\<images\>  
\<pic\>  
\<image\>sample1.jpg\</image\>  
\<title\>Google\</title\>  
\<headline\>headline 1\</headline\>  
\<description\>this is the description of article 1.\</description\>  
\<link\>[http://www.google.com](http://www.google.com)\</link\>  
\<targetIsUrl\>Y\</targetIsUrl\>  
\</pic\>  
\<pic\>  
\<image\>sample2.jpg\</image\>  
\<caption\>Yahoo\</caption\>  
\<headline\>headline 2\</headline\>  
\<description\>this is the description of article 2.\</description\>  
\<link\>[http://www.yahoo.com](http://www.yahoo.com)\</link\>  
\<targetIsUrl\>Y\</targetIsUrl\>  
\</pic\>  
\<pic\>  
\<image\>sample3.jpg\</image\>  
\<caption\>BAS-llc\</caption\>  
\<headline\>headline 3\</headline\>  
\<description\>this is the description of article 3.\</description\>  
\<link\>[http://www.bas-llc.com](http://www.bas-llc.com)\</link\>  
\<targetIsUrl\>Y\</targetIsUrl\>  
\</pic\>  
\<pic\>  
\<image\>sample4.jpg\</image\>  
\<caption\>USC Trojans\</caption\>  
\<headline\>headline 4\</headline\>  
\<description\>this is the description of article 4.\</description\>  
\<link\>[http://www.uscripsit.com](http://www.uscripsit.com)\</link\>  
\<targetIsUrl\>Y\</targetIsUrl\>  
\</pic\>  
\</images\>
