# Xml slider needs counter / or dynamic numbers

**URL:** https://forum.kirupa.com/t/xml-slider-needs-counter-or-dynamic-numbers/229930
**Category:** Uncategorized
**Created:** [June 21, 2007, 10:30am UTC](https://forum.kirupa.com/t/xml-slider-needs-counter-or-dynamic-numbers/229930 "2007-06-21T10:30:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![arn](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arn](https://forum.kirupa.com/u/arn)
#### Post date: [June 21, 2007, 10:30am UTC](https://forum.kirupa.com/t/xml-slider-needs-counter-or-dynamic-numbers/229930/1 "2007-06-21T10:30:35Z")

</div>

Hi All,

I hope someone can help me out with the following:  
I have a horizontal xml picture and info slider. All works fine exept  
I need some additional features to it…

one of them to start of with is a “counter”, 2 dynamic textfields which display  
A:the current picture number and  
B:the total number of pictures

here is my current actionscript:  
[AS]  
my\_xml = new XML();  
my\_xml.ignoreWhite = true;  
my\_xml.load(“slider.xml”);  
my\_xml.onLoad = function(status) {  
if (status) {  
obj\_xml = this.firstChild.childNodes;  
clipGen();  
}  
};

function clipGen() {  
for (var i = 0; i \< obj\_xml.length; i++) {  
this.attachMovie(“clip”, “clip” + i, i);  
this[“clip” + i].display\_txt.text = i+1;  
this[“clip” + i].\_x = this[“clip” + i].\_width \* i;  
this[“clip” + i].\_y = 0;  
this[“clip” + i].titel\_txt.text = obj\_xml\*.attributes.titel;  
this[“clip” + i].date\_txt.text = obj\_xml\*.attributes.datum;  
this[“clip” + i].content\_txt.text = obj\_xml\*.firstChild;  
this[“clip” + i].image\_mc.loadMovie(obj\_xml\*.attributes.bild);  
this[“clip” + i].url\_btn.url = obj\_xml\*.attributes.links;  
this[“clip” + i].url\_btn.onRelease = function() {  
getURL(this.url,"\_blank");  
}  
}  
[/AS]

Even better would be a horizontal line of number 123etc…which would be clickable…  
and direct the slider to the acoording project…

and still not incorporated is a preloading script…but let’s start with the counting thingy…😉

Hope someone can advice/assist me with some "counting"actionscript

Thanks in advance!

Best,

Arn
