If anyone could help me out it would be much appreciated. I have menu system built loading XML, when you click a menu item it loads up a seperate XML file for a picture gallery. When you click on a thumbnail it shows a preview image of the thumbnail, and I want it so when you click the preview image it will open upto a new browser and go directly to an image i specify in my XML.
Here is the code I wrote:
function createGallery(gallery_xml)
{
var galleryPictures = gallery_xml.firstChild.childNodes;
imageGallery = mainMenu.attachMovie(“gallery_mc”,“imageGallery_mc”, 300); //attaches dynamic text box for preview description
imageGallery_image = mainMenu.attachMovie(“galleryimage_mc”,“imageGallery_image_mc”,302);
imageGallery_image.createEmptyMovieClip(“image_container”,400);
imageGallery._x = 280; //attaches and sets image gallery
imageGallery._y = 230; // at this X and Y
thumb_holder = menuMovieClip.attachMovie(“gallerythumb_mc”, “gallery_holder”, 251); //attaches thumbnail skeletons
imageGallery_image._x = 275;
imageGallery_image._y = 180;
for (var i = 0; i < galleryPictures.length; i++){
var currPicture = galleryPictures*;
var currThumb_mc = thumb_holder.attachMovie("thumbgallery_mc","thumbs"+thumb_count,270+thumb_count);
currThumb_mc.createEmptyMovieClip("thumb_container",280+thumb_count); currThumb_mc.thumb_container.loadMovie(currPicture.attributes.thumb);
…
currThumb_mc.image = currPicture.attributes.image;
currThumb_mc.description = currPicture.attributes.description;
imageGallery_image_mc.link = currPicture.attributes.link;
currThumb_mc.onRollOver = currThumb_mc.onDragOver = function () {
this.onEnterFrame = function() {
if (this.thumbgallery_bg._alpha < 100) {
this.thumbgallery_bg._alpha += 10;
}
}
}
currThumb_mc.onRollOut = currThumb_mc.onDragOut = function () {
this.onEnterFrame = function() {
if (this.thumbgallery_bg._alpha > 0) {
this.thumbgallery_bg._alpha -= 13;
}
}
}
currThumb_mc.onRelease = function(){
imageGallery_image.image_container.loadMovie(this.image);
imageGallery.gallery_txt.text = this.description;
imageGallery_image.image_container._y = -80;
//imageGallery_image._x = 280;
//imageGallery_image._visible = false;
}
**[color=Red] imageGallery_image.onMouseUp = function(){
getURL(imageGallery_image_mc.link, "_blank");
}
}
[color=Black]The red part is the code I’m trying to use. I tryed many variations on the code I have there, including changing the actual function name, and the link name inside of the getURL. Each thumbnail inside of the XML file has a specified “link” attribute, which I want my code to load when you click on the preview image that comes up. I know this is a simple problem, I just can’t seem to figure it out and it’s been driving me nuts! :tb:[/color]
[/color]**