# Creating Links with XML and Actionscript - Kirupas XML PG

**URL:** https://forum.kirupa.com/t/creating-links-with-xml-and-actionscript-kirupas-xml-pg/135258
**Category:** Uncategorized
**Created:** [January 25, 2005, 11:36pm UTC](https://forum.kirupa.com/t/creating-links-with-xml-and-actionscript-kirupas-xml-pg/135258 "2005-01-25T23:36:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![netliance](https://avatars.discourse-cdn.com/v4/letter/n/91b2a8/32.png) [@netliance](https://forum.kirupa.com/u/netliance)
#### Post date: [January 25, 2005, 11:36pm UTC](https://forum.kirupa.com/t/creating-links-with-xml-and-actionscript-kirupas-xml-pg/135258/1 "2005-01-25T23:36:52Z")

</div>

Here’s my scenario…

I have a flash PhotoGallery that loads pictures automatically. The images are being pulled from an XML file. I’d like to include the links that images go to in the \<link\>link to ad page\</link\> tag and then I need to have my flash movie make the image a clickable link.

in essence, in HTML, it would look like this:

```auto

<a href="blahsomelink.html"><img src="blahsomeimage.gif" border="0"></a>

```

but I have the xml file which looks like this:

```auto

<pic>
<image>http://www.egzist.com/Flash_Ad_rotator/C92370.jpg</image>
<link>http://www.egzist.com/Flash_Ad_rotator/C92370..html</link>
</pic>

```

so i need the. jpg link to the .html file.

The actionscript calls this xml info:

```auto

function loadXML(loaded) { 
if (loaded) { 
xmlNode = this.firstChild; 
image = []; 
description = []; 
total = xmlNode.childNodes.length; 
for (i=0; i<total; i++) { 
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue; 
description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
} 

```

what would i need to lookup and research to get this working properly?

Thanks for the time and help!
