# Need to display more help thumbnail need help

**URL:** <https://forum.kirupa.com/t/need-to-display-more-help-thumbnail-need-help/215329>\
**Category:** Uncategorized\
**Created:** [February 6, 2007, 1:41pm UTC](https://forum.kirupa.com/t/need-to-display-more-help-thumbnail-need-help/215329 "2007-02-06T13:41:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhytha](https://avatars.discourse-cdn.com/v4/letter/r/3bc359/32.png) [@rhytha](https://forum.kirupa.com/u/rhytha)\
**Post date:** [February 6, 2007, 1:41pm UTC](https://forum.kirupa.com/t/need-to-display-more-help-thumbnail-need-help/215329/1 "2007-02-06T13:41:17Z")

</div>

I’m trying to get more thumbnail movieclips on the same page to display two different arrays of pictures. It’s not working though and I’m not sure why, could someone please look at my xml and ActionScript and see what I’m doingwrong. I’ve been at this for a few hours now and I can’t see whats wrong. Please help!

XML:

\<?xml version=“1.0” encoding=“utf-8” standalone=“yes”?\>  
\<images\>  
\<pic\>  
\<category\>Bodysuit\</category\>  
\<name\>Body Suit 1\</name\>  
\<description\>Body Suit 1 description.\</description\>  
\<mainimage\>photos/bodysuit/large/bs1.jpg\</mainimage\>  
\<mainthumb\>photos/bodysuit/small/bs1.jpg\</mainthumb\>  
\<price\>$00.00\</price\>  
\<sizes\>0 - 0\</sizes\>  
\<otherimages\>photos/bodysuit/large/bs1.jpg\</otherimages\>  
\<otherthumbs\>photos/bodysuit/small/bs1.jpg\</otherthumbs\>  
\<otherimages1\>photos/bodysuit/large/bs2.jpg\</otherimages1\>  
\<otherthumbs1\>photos/bodysuit/small/bs2.jpg\</otherthumbs1\>  
\<otherimages2\>photos/bodysuit/large/bs3.jpg\</otherimages2\>  
\<otherthumbs2\>photos/bodysuit/small/bs3.jpg\</otherthumbs2\>  
\<otherimages3\>photos/bodysuit/large/bs4.jpg\</otherimages3\>  
\<otherthumbs3\>photos/bodysuit/small/bs4.jpg\</otherthumbs3\>  
\</pic\>  
\<pic\>  
\<category\>Bodysuit\</category\>  
\<name\>Body Suit 2\</name\>  
\<description\>Body Suit 2 description.\</description\>  
\<mainimage\>photos/bodysuit/large/bs2.jpg\</mainimage\>  
\<mainthumb\>photos/bodysuit/small/bs2.jpg\</mainthumb\>  
\<price\>$00.00\</price\>  
\<sizes\>0 - 0\</sizes\>  
\<otherimages\>photos/bodysuit/large/bs2.jpg\</otherimages\>  
\<otherthumbs\>photos/bodysuit/small/bs2.jpg\</otherthumbs\>  
\<otherimages1\>photos/bodysuit/large/bs2.jpg\</otherimages1\>  
\<otherthumbs1\>photos/bodysuit/small/bs2.jpg\</otherthumbs1\>  
\<otherimages2\>photos/bodysuit/large/bs3.jpg\</otherimages2\>  
\<otherthumbs2\>photos/bodysuit/small/bs3.jpg\</otherthumbs2\>  
\<otherimages3\>photos/bodysuit/large/bs4.jpg\</otherimages3\>  
\<otherthumbs3\>photos/bodysuit/small/bs4.jpg\</otherthumbs3\>  
\</pic\>  
\<pic\>  
\<category\>Bodysuit\</category\>  
\<name\>Body Suit 3\</name\>  
\<description\>Body Suit 3 description.\</description\>  
\<mainimage\>photos/bodysuit/large/bs3.jpg\</mainimage\>  
\<mainthumb\>photos/bodysuit/small/bs3.jpg\</mainthumb\>  
\<price\>$00.00\</price\>  
\<sizes\>0 - 0\</sizes\>  
\<otherimages\>photos/bodysuit/large/bs3.jpg\</otherimages\>  
\<otherthumbs\>photos/bodysuit/small/bs3.jpg\</otherthumbs\>  
\<otherimages1\>photos/bodysuit/large/bs2.jpg\</otherimages1\>  
\<otherthumbs1\>photos/bodysuit/small/bs2.jpg\</otherthumbs1\>  
\<otherimages2\>photos/bodysuit/large/bs3.jpg\</otherimages2\>  
\<otherthumbs2\>photos/bodysuit/small/bs3.jpg\</otherthumbs2\>  
\<otherimages3\>photos/bodysuit/large/bs4.jpg\</otherimages3\>  
\<otherthumbs3\>photos/bodysuit/small/bs4.jpg\</otherthumbs3\>  
\</pic\>  
\<pic\>  
\<category\>Bodysuit\</category\>  
\<name\>Body Suit 4\</name\>  
\<description\>Body Suit 4 description.\</description\>  
\<mainimage\>photos/bodysuit/large/bs4.jpg\</mainimage\>  
\<mainthumb\>photos/bodysuit/small/bs4.jpg\</mainthumb\>  
\<price\>$00.00\</price\>  
\<sizes\>0 - 0\</sizes\>  
\<otherimages\>photos/bodysuit/large/bs4.jpg\</otherimages\>  
\<otherthumbs\>photos/bodysuit/small/bs4.jpg\</otherthumbs\>  
\<otherimages1\>photos/bodysuit/large/bs2.jpg\</otherimages1\>  
\<otherthumbs1\>photos/bodysuit/small/bs2.jpg\</otherthumbs1\>  
\<otherimages2\>photos/bodysuit/large/bs3.jpg\</otherimages2\>  
\<otherthumbs2\>photos/bodysuit/small/bs3.jpg\</otherthumbs2\>  
\<otherimages3\>photos/bodysuit/large/bs4.jpg\</otherimages3\>  
\<otherthumbs3\>photos/bodysuit/small/bs4.jpg\</otherthumbs3\>  
\</pic\>  
\<pic\>  
\<category\>Bodysuit\</category\>  
\<name\>Body Suit 5\</name\>  
\<description\>Body Suit 5 description.\</description\>  
\<mainimage\>photos/bodysuit/large/bs5.jpg\</mainimage\>  
\<mainthumb\>photos/bodysuit/small/bs5.jpg\</mainthumb\>  
\<price\>$00.00\</price\>  
\<sizes\>0 - 0\</sizes\>  
\<otherimages\>photos/bodysuit/large/bs5.jpg\</otherimages\>  
\<otherthumbs\>photos/bodysuit/small/bs5.jpg\</otherthumbs\>  
\<otherimages1\>photos/bodysuit/large/bs2.jpg\</otherimages1\>  
\<otherthumbs1\>photos/bodysuit/small/bs2.jpg\</otherthumbs1\>  
\<otherimages2\>photos/bodysuit/large/bs3.jpg\</otherimages2\>  
\<otherthumbs2\>photos/bodysuit/small/bs3.jpg\</otherthumbs2\>  
\<otherimages3\>photos/bodysuit/large/bs4.jpg\</otherimages3\>  
\<otherthumbs3\>photos/bodysuit/small/bs4.jpg\</otherthumbs3\>  
\</pic\>  
\<pic\>  
\<category\>Bodysuit\</category\>  
\<name\>Body Suit 6\</name\>  
\<description\>Body Suit 6 description.\</description\>  
\<mainimage\>photos/bodysuit/large/bs6.jpg\</mainimage\>  
\<mainthumb\>photos/bodysuit/small/bs6.jpg\</mainthumb\>  
\<price\>$00.00\</price\>  
\<sizes\>0 - 0\</sizes\>  
\<otherimages\>photos/bodysuit/large/bs6.jpg\</otherimages\>  
\<otherthumbs\>photos/bodysuit/small/bs6.jpg\</otherthumbs\>  
\<otherimages1\>photos/bodysuit/large/bs2.jpg\</otherimages1\>  
\<otherthumbs1\>photos/bodysuit/small/bs2.jpg\</otherthumbs1\>  
\<otherimages2\>photos/bodysuit/large/bs3.jpg\</otherimages2\>  
\<otherthumbs2\>photos/bodysuit/small/bs3.jpg\</otherthumbs2\>  
\<otherimages3\>photos/bodysuit/large/bs4.jpg\</otherimages3\>  
\<otherthumbs3\>photos/bodysuit/small/bs4.jpg\</otherthumbs3\>  
\</pic\>

\</images\>

ActionScript:

function loadXML(loaded) {

```
if (loaded) {
    
    xmlNode = this.firstChild;
    category = [];
    title = [];
    image = [];
    description = [];
    thumbnails = [];
    price = [];
    sizes = [];
    otherimages = [];
    otherthumbs = [];
    otherimages1 = [];
     otherthumbs 1= [];
    otherimages2 = [];
     otherthumbs2 = [];
    otherimages3 = [];
     otherthumbs3 = [];

    total = xmlNode.childNodes.length;
    
    for (i=0; i&lt;total; i++) {
        category* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
        title* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
        description* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
        image* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
        thumbnails* = xmlNode.childNodes*.childNodes[4].firstChild.nodeValue;
        thumbnails_fn(i);
        price* = xmlNode.childNodes*.childNodes[5].firstChild.nodeValue;
        sizes* = xmlNode.childNodes*.childNodes[6].firstChild.nodeValue;
        otherimages* = xmlNode.childNodes*.childNodes[7].firstChild.nodeValue;
        otherthumbs* = xmlNode.childNodes*.childNodes[8].firstChild.nodeValue;
        otherimages1* = xmlNode.childNodes*.childNodes[9].firstChild.nodeValue;
         otherthumbs1* = xmlNode.childNodes*.childNodes[10].firstChild.nodeValue;
        otherimages2* = xmlNode.childNodes*.childNodes[11].firstChild.nodeValue;
         otherthumbs2* = xmlNode.childNodes*.childNodes[12].firstChild.nodeValue;
        otherimages3* = xmlNode.childNodes*.childNodes[13].firstChild.nodeValue;
         otherthumbs3* = xmlNode.childNodes*.childNodes[14].firstChild.nodeValue;

    }

```

//firstImage();  
\_root.picture.loadMovie(“movie.swf”);

```
} else {
    
    content = "file not loaded!";
    
}

```

}

xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“active.xml”);

/////////////////////////////////////  
listen = new Object();  
listen.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
prevImage();  
} else if (Key.getCode() == Key.RIGHT) {  
nextImage();  
}  
};

Key.addListener(listen);  
previous\_btn.onRelease = function() {  
prevImage();  
};

next\_btn.onRelease = function() {  
nextImage();  
};

/////////////////////////////////////  
p = 0;  
this.onEnterFrame = function() {  
filesize = picture.getBytesTotal();  
loaded = picture.getBytesLoaded();  
preloader.\_visible = true;  
if (loaded != filesize) {  
preloader.preload\_bar.\_xscale = 100\*loaded/filesize;  
} else {  
preloader.\_visible = false;  
if (picture.\_alpha\<100) {  
picture.\_alpha += 10;  
}  
}

};

function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
price\_txt.text = price[p];  
sizes\_txt.text = sizes[p];  
title\_txt.text = title[p];

thumbnails\_fn1(k) /////// i am calling the second function here it display the first image when i click the thumbnail. once i click the second thumbnail second image is appending.

```
        picture_num();
        
    }
}

```

}

function prevImage() {  
if (p\>0) {  
p–;  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
price\_txt.text = price[p];  
sizes\_txt.text = sizes[p];  
title\_txt.text = title[p];  
picture\_num();  
}  
}

function firstImage() {  
if (loaded == filesize){  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
desc\_txt.text = description[0];  
price\_txt.text = price[0];  
sizes\_txt.text = sizes[0];  
title\_txt.text = title[0];  
picture\_num();

```
}

```

}

function picture\_num() {  
current\_pos = p+1;  
pos\_txt.text = current\_pos+" / "+total;  
}

function thumbNailScroller() {  
// thumbnail code!  
this.createEmptyMovieClip(“tscroller”, 1000);  
scroll\_speed = 10;  
tscroller.onEnterFrame = function() {  
if ((\_root.\_ymouse\>=thumbnail\_mc.\_y) && (\_root.\_ymouse\<=thumbnail\_mc.\_y+thumbnail\_mc.\_heig ht)) {  
if ((\_root.\_xmouse\>=(hit\_right.\_x-40)) && (thumbnail\_mc.hitTest(hit\_right))) {  
thumbnail\_mc.\_x -= scroll\_speed;  
} else if ((\_root.\_xmouse\<=(hit\_left.\_x+40)) && (thumbnail\_mc.hitTest(hit\_left))) {  
thumbnail\_mc.\_x += scroll\_speed;  
}  
} else {  
delete tscroller.onEnterFrame;  
}  
};  
}

function thumbnails\_fn(k) {  
thumbnail\_mc.createEmptyMovieClip(“t”+k, thumbnail\_mc.getNextHighestDepth());  
tlistener = new Object();  
tlistener.onLoadInit = function(target\_mc) {  
target\_mc.\_x = hit\_left.\_x+(target\_mc.\_width+5)\*k;  
target\_mc.pictureValue = k;  
target\_mc.onRelease = function() {  
p = this.pictureValue-1;  
nextImage();  
};

```
    target_mc.onRollOver = function() {
        this._alpha = 50;
        thumbNailScroller();
    };
    
    target_mc.onRollOut = function() {
        this._alpha = 100;
    };
    
};

image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);

```

}

function thumbNailScroller1() {  
// thumbnail code!  
this.createEmptyMovieClip(“tscroller”, 1000);  
scroll\_speed = 10;  
tscroller.onEnterFrame = function() {  
if ((\_root.\_xmouse\>=thumbnail\_mc1.\_x) && (\_root.\_xmouse\<=thumbnail\_mc1.\_x+thumbnail\_mc1.\_height)) {  
if ((\_root.\_ymouse\>=(hit\_bottom.\_y-40)) && (thumbnail\_mc1.hitTest(hit\_bottom))) {  
thumbnail\_mc1.\_y -= scroll\_speed;  
} else if ((\_root.\_ymouse\<=(hit\_top.\_y+40)) && (thumbnail\_mc1.hitTest(hit\_top))) {  
thumbnail\_mc1.\_y += scroll\_speed;  
}  
} else {  
delete tscroller.onEnterFrame;  
}  
};  
}  
function thumbnails\_fn1(k) {  
//thumbnail\_mc1.loadMovie("");  
thumbnail\_mc1.createEmptyMovieClip(“t”+k, thumbnail\_mc1.getNextHighestDepth());  
//thumbnail\_mc1.createEmptyMovieClip(“t1”+k+1, thumbnail\_mc1.getNextHighestDepth());  
slistener = new Object();  
slistener.onLoadInit = function(target\_mc1) {  
target\_mc1.\_y = hit\_top.\_x+(target\_mc.\_width+5)\*k;  
target\_mc1.pictureValue = k;  
target\_mc1.onRelease = function() {  
p = this.pictureValue-1;  
nextImage();

```
    };
    target_mc1.onRollOver = function() {
        this._alpha = 50;
        thumbNailScroller1();
    };
    target_mc1.onRollOut = function() {
        this._alpha = 100;
    };
};
image1_mcl = new MovieClipLoader();
image1_mcl.addListener(slistener);
image1_mcl.loadClip(thumbnails1[k], "thumbnail_mc1.t"+k);
//image_mc2 = new MovieClipLoader();
//image_mc2.addListener(tlistener);
//image1_mc1.loadClip(thumbnails1[k+1], "thumbnail_mc1.t"+k);

```

}

If you can help that would be great!
