Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modified Photogallery script with XML, buttons not functioning.

Status
Not open for further replies.

bananasbananas

IS-IT--Management
Apr 26, 2006
19
GB
Helloo, I'm having trouble with a photogallery script i've modified to display multiple SWF files together in one file.

-------------------
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;

for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes;
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
spacingX = this.picHolder.attributes.x;
spacingY = this.picHolder.attributes.y;
this.thumbHolder._x = spacingX;
this.thumbHolder._y = spacingY;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.main = this.picHolder.attributes.main;

this.thumbHolder.onRelease = function() {
trace(this.title);

var pcode = this.title;
getURL("map.asp?pcode="+pcode, "search_results");
};


}
};
myPhoto.load("xmlphoto.xml");


-------------
I've managed to pull the correct files, and place them at the correct x,y coordinates using an XML document.

I now want them to act as buttons.

Currently, when you click on any MovieClip of any file it pulls the first XML record 'title' - "b1", and nothing else. When I place:

trace(this.thumbHolder.title);

-above:

this.thumbHolder.onRelease = function() {

I am presented with the correct XML records. So I'm thinking the OnRelease function isn't relating correctly.

thanks, Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top