# Dispaly clickable buttons based on number of similar nodes in an XML file?

**URL:** https://forum.kirupa.com/t/dispaly-clickable-buttons-based-on-number-of-similar-nodes-in-an-xml-file/215666
**Category:** flash
**Created:** [February 9, 2007, 5:40am UTC](https://forum.kirupa.com/t/dispaly-clickable-buttons-based-on-number-of-similar-nodes-in-an-xml-file/215666 "2007-02-09T05:40:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![BadBadNeil](https://avatars.discourse-cdn.com/v4/letter/b/f4b2a3/32.png) [@BadBadNeil](https://forum.kirupa.com/u/BadBadNeil)
#### Post date: [February 9, 2007, 5:40am UTC](https://forum.kirupa.com/t/dispaly-clickable-buttons-based-on-number-of-similar-nodes-in-an-xml-file/215666/1 "2007-02-09T05:40:50Z")

</div>

I have a flash gallery (that works ok as it is) however I’d like to upgrade it a bit and I’m stumped.

Right now there is a single image for each portfolio item pulled from an XML file. Some portfolio items however have more than 1 image. Some have 2 and a few have up to 4 or 5.

How can flash automatically see how many similar nodes there are within a set and then display a clickable “1, 2, 3, etc” button below the image to view each photo or if there is only 1 photo, no numbers will appear at all?

Thanks!  
Neil

They will use a format similar as shown below. Notice how the first one only has 1 image and the second has 3 image nodes.

```auto

<images>
    <pic>
	<image>images/web/dictaphone.jpg</image>
	<description>Description: Working with the Dictaphone marketing department worked on a complete overhaul of the entire Dictaphone website.</description>
	<thumbnail>images/web/dictaphone_s.jpg</thumbnail>
	<sectitle>Web</sectitle>
	<client>Client: Dictaphone Corporation</client>
	<project>Project: Company Website</project>
    </pic>
    <pic>
        <image>images/web/upstart1.jpg</image>
        <image>images/web/upstart2.jpg</image>
        <image>images/web/upstart3.jpg</image>
        <description>Description: Creation of the new Upstart Training website and formulation of entirely new corporate branding.</description>
        <thumbnail>images/web/upstart_s.jpg</thumbnail>
	<sectitle>Web</sectitle>
	<client>Client: Upstart Training</client>
	<project>Project: Website</project>
    </pic>
</images>

```
