# Searchable image database, need a wee bit of help

**URL:** <https://forum.kirupa.com/t/searchable-image-database-need-a-wee-bit-of-help/204118>\
**Category:** flash\
**Created:** [October 17, 2006, 8:35am UTC](https://forum.kirupa.com/t/searchable-image-database-need-a-wee-bit-of-help/204118 "2006-10-17T08:35:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ColJox](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@ColJox](https://forum.kirupa.com/u/ColJox)\
**Post date:** [October 17, 2006, 8:35am UTC](https://forum.kirupa.com/t/searchable-image-database-need-a-wee-bit-of-help/204118/1 "2006-10-17T08:35:45Z")

</div>

[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](http://www.kirupa.com/web/xml/examples/searchbestof.htm) 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](http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm).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.

```auto

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.](http://www.savefile.com/files/167568)

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.
