bananasbananas
IS-IT--Management
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
-------------------
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