Searchable image database, need a wee bit of help

[EDIT] I forgot to write that the code is in flash 8 atm.

Hi,

I recently found kirupa and started learning flash, now i’ve modified the code from Senoculars XML search to search through keywords for my images and display the results.

When you click an image it gets magnified. My problem comes from wanting to be able to use a button to change between the images, like in this photo gallery.My problem is getting the number of the image I just clicked, if I can get that, writing the function to step between images will be no problem.


DisplayNodes = function (nodes, field_txt) {
item_xcount = 0;
item_ycount = 0;
    field_txt.htmlText = "";
    var entry;
    var separator = "<br>_______________________<br><br>";
    var total = nodes.length;
    url = [];
    for (var i = 0; i<nodes.length; i++) {
        url* = nodes*.childNodes[0].firstChild.nodeValue;
        
        trace(i);
        
        var currentImage_mc = display_mc.attachMovie("menu_item","item"+i,i);
        currentImage_mc._x = i * item_spacing_x;
        
        currentImage_mc.createEmptyMovieClip("image_container",0);
        currentImage_mc.image_container.loadMovie(url*);
        currentImage_mc.image_container._xscale = 10;
        currentImage_mc.image_container._yscale = 10;
        currentImage_mc.description_txt.text =i + nodes*.childNodes[1].firstChild.nodeValue;
        
        currentImage_mc.image = url*;
        currentImage_mc.description = nodes*.childNodes[1].firstChild.nodeValue;
            
        currentImage_mc.onRelease = function(){
            panel_mc._visible = true;
            _root.panel_mc.display_txt.text = this.description;
            _root.panel_mc.image_mc.loadMovie(this.image); //I want to assign the number of this movieclip to "p" so I can use a function as shown below.
            _root.panel_mc.image_mc._xscale = 35;
            _root.panel_mc.image_mc._yscale = 35;
            
            
            //test_mc.loadMovie(url[2],1);    loading movieclips this way works but I don't know how to implement a
            // function that assigns "p" the number of the image you clicked to be able to display it this way.
        }

You can download the XML, Flash and images here.

Search keywords are “vinter”, “hamn”, “möllan”, “Hissingen”, “vid”, “strömsholmen”, “åbackarna”.

Thank you in advance for the help and thank you for a great website.