# Please Help really stuck on gallery Problem

**URL:** <https://forum.kirupa.com/t/please-help-really-stuck-on-gallery-problem/262228>\
**Category:** flash\
**Created:** [June 4, 2008, 9:22am UTC](https://forum.kirupa.com/t/please-help-really-stuck-on-gallery-problem/262228 "2008-06-04T09:22:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ro1798](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@ro1798](https://forum.kirupa.com/u/ro1798)\
**Post date:** [June 4, 2008, 9:22am UTC](https://forum.kirupa.com/t/please-help-really-stuck-on-gallery-problem/262228/1 "2008-06-04T09:22:45Z")

</div>

hi i have the gallery done from the kirupa tutorials but i can get a url link when the large image is diyplayed… here are my xml and my flash

Flash:  
spacing = 10;  
containerMC.\_alpha = 0;  
var pArray = new Array();  
var tArray = new Array();  
var cur = 0;  
MovieClip.prototype.loadPic = function(pic) {  
cur = pic;  
containerMC.\_alpha = 0;  
this.loadMovie(pArray[pic]);  
this.\_parent.onEnterFrame = function() {  
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();  
bar.\_visible = 1;  
per = Math.round((l/t)\*100);

if (t == l && containerMC.\_width\>0 && containerMC.\_height\>0) {  
var w = containerMC.\_width+spacing, h = containerMC.\_height+spacing;  
border.resizeMe(w, h);  
bar.\_visible = 0;  
picinfo.info.text = tArray[pic];  
containerMC._alpha = 0;  
delete this.onEnterFrame;  
containerMC.onRelease = function() {  
getURL("_");  
};  
} else {  
bar.\_width = per;  
picinfo.info.text = per+" % loaded";  
}  
};

};

MovieClip.prototype.resizeMe = function(w, h, pic) {  
var speed = 3;  
this.onEnterFrame = function() {  
this.\_width += (w-this.\_width)/speed;  
this.\_height += (h-this.\_height)/speed;  
nav.\_x = Math.round(this.\_x-this.\_width/2);  
nav.\_y = Math.round(this.\_y+this.\_height/2+spacing/2);  
prevb.\_x = nav.\_x-5;  
nextb.\_x = nav.\_x+this.\_width+5;  
nextb.\_y = prevb.\_y=this.\_y-this.\_height/2;  
picinfo.\_y = nextb.\_y-5;  
picinfo.\_x = border.\_x-picinfo.\_width/2;  
if (Math.abs(this.\_width-w)\<1 && Math.abs(this.\_height-h)\<1) {  
this.\_width = w;  
this.\_height = h;  
containerMC.\_x = this.\_x-this.\_width/2+spacing/2;  
containerMC.\_y = this.\_y-this.\_height/2+spacing/2;  
containerMC.\_alpha = 100;  
delete this.onEnterFrame;  
}  
};  
};  
var gallery\_xml = new XML();  
gallery\_xml.ignoreWhite = true;  
gallery\_xml.onLoad = function(success) {  
if (success) {  
var gallery = this.firstChild;  
gallery\_txt.text = gallery.attributes.info;  
for (var i = 0; i\<gallery.childNodes.length; i++) {  
tArray.push(gallery.childNodes\*.attributes.title);  
pArray.push(gallery.childNodes\*.attributes.source);  
rArray.push(gallery.childNodes\*.attributes.url);  
}  
containerMC.loadPic(0);  
} else {  
title\_txt.text = “Error!”;  
}

};  
gallery\_xml.load(“gallery.xml”);  
prevb.onRelease = function() {  
cur–;  
if (cur\<0) {  
containerMC.loadPic(pArray.length-1);  
} else {  
containerMC.loadPic(cur);  
}  
};

nextb.onRelease = function() {  
cur++;  
if (cur\>pArray.length-1) {  
containerMC.loadPic(0);

} else {  
containerMC.loadPic(cur);

}

};

XML:  
\<?xml version=“1.0” encoding=“UTF-8”?\>  
\<portfolio info =“Fuji Cameras 2008”\>

\<image title=“Fuji J10” source=“J10.jpg” url= “[[COLOR=#003366]http://www.google.com[/COLOR]](http://www.google.com/)” target="\_blank"/\>  
\<image title=“Fuji S100” source=“S100.jpg”/\>  
\<image title=“Fuji S1000fd” source=“S1000fd.jpg”/\>  
\<image title=“Fuji S8100” source=“S8100.jpg”/\>  
\<image title=“Fuji Z20fd” source=“Z20fd.jpg”/\>  
\<image title=“Fuji J50” source=“J50.jpg”/\>  
\<image title=“Fuji F100fd” source=“F100fd.jpg”/\>

\</portfolio\>

when i click on the image i get a bad link as if nothing is coming from the xml… only one is set up at the moment.

thanks a million

ronan

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [June 4, 2008, 9:42am UTC](https://forum.kirupa.com/t/please-help-really-stuck-on-gallery-problem/262228/2 "2008-06-04T09:42:12Z")

</div>

What errors are you getting exactly?
