# Hyperlink on xml loaded image

**URL:** <https://forum.kirupa.com/t/hyperlink-on-xml-loaded-image/155894>\
**Category:** Uncategorized\
**Created:** [July 21, 2005, 3:48am UTC](https://forum.kirupa.com/t/hyperlink-on-xml-loaded-image/155894 "2005-07-21T03:48:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![swamyg1](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@swamyg1](https://forum.kirupa.com/u/swamyg1)\
**Post date:** [July 21, 2005, 3:48am UTC](https://forum.kirupa.com/t/hyperlink-on-xml-loaded-image/155894/1 "2005-07-21T03:48:21Z")

</div>

Hello all,

Ok I’m having a problem linking to an external website by clicking on a link in my gallery. I’m back into Flash after taking a 2 year break, EEKS!

**Here is my code:**  
var gallery\_xml = new XML();  
gallery\_xml.ignoreWhite = true;  
gallery\_xml.onLoad = function(success) {  
if (success) {  
var gallery = this.firstChild;  
trace(gallery.childNodes.length)  
for (var i = 0; i\<gallery.childNodes.length; i++) {  
tArray.push(gallery.childNodes\*.attributes.title);  
pArray.push(gallery.childNodes\*.attributes.source);  
qArray.push(gallery.childNodes\*.attributes.link);  
}  
containerMC.loadPic(0);  
} else {  
title\_txt.text = “Error!”;  
}  
};

**I’m Using a picture\_mask to do the clicking and here’s what I have for that:**  
Key.addListener(listen);  
q = 0;  
picture\_mask.onRelease = function ()  
{  
getURL(link[q], “\_blank”);  
};

**And then in my xml stylesheet I have it like this:**  
\<portfolio\>  
\<image title=“Kirupa Rocks” source=“web1.jpg” link="\<A href=“[http://www.kirupa.com/"/"](http://www.kirupa.com/%22/%22)\>[http://www.kirupa.com/](http://www.kirupa.com/)”/\>  
\</portfolio\>

**Everytime I click on the mask it opens up my root folder in explorer where I have all the files stored for my site… What gives?**

**Thanks in advance for your help.**

Swamyg1
