I am using an XML gallery in flash and I have now run into a situation where the pictures that the client wants to use will vary in size and they want to be able to change the gallery pictures on a monthly basis (reason for using the XML).
The thumbs arent an issue but I can imagine the larger images will be. I have seen javascript lightboxes used in flash and I have this page detailing how to use it in flash Link to page, problem is I am using XML. Below is my XML code. Has anyne done this before? I think I see an opening where I could place this but I am sure how to change it from loading the image into a container to loading it via href and bring up the "getURL" line.
Any help or direction would be a huge help. I am very new to xml and had some great help to get the xml working right.Code:myPhoto = new XML(); myPhoto.ignoreWhite = true; var count:Number = 0; // Variable that counts how many movieclips have rendered thus far var yPos:Number = 0; // Initial _y coordinate of the first row myPhoto.onLoad = function(success) { //portfolioTag = this.firstChild; numimages = this.firstChild.childNodes.length; spacing = 51; for (i=0; i<numimages; i++) { this.picHolder = this.firstChild.childNodes[i]; this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i); this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0); this.thumbLoader.loadMovie(this.picHolder.attributes.thmb); this.thumbHolder.title = this.picHolder.attributes.title; //main in my xml calls up the images this.thumbHolder.main = this.picHolder.attributes.main; this.thumbHolder.onRelease = function() { loader.loadMovie(this.main); title_txt.text = this.title; } if (count == 8) { // if count = 4, we're at the end of the row count = 0; // reset count to 0 yPos = yPos + 70; // incease the _y coordinate for the next row (100 = height of element plus padding) } this.thumbHolder._y = count*spacing // set _x coordinate this.thumbHolder._x = yPos; // set _y coordinate count++; // increase count by 1 }; }; myPhoto.load("wedding.xml");
-- Nate






Bookmarks