# Need help in flash xml menu

**URL:** <https://forum.kirupa.com/t/need-help-in-flash-xml-menu/170451>\
**Category:** flash\
**Created:** [November 26, 2005, 6:46am UTC](https://forum.kirupa.com/t/need-help-in-flash-xml-menu/170451 "2005-11-26T06:46:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abacus](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@abacus](https://forum.kirupa.com/u/abacus)\
**Post date:** [November 26, 2005, 6:46am UTC](https://forum.kirupa.com/t/need-help-in-flash-xml-menu/170451/1 "2005-11-26T06:46:15Z")

</div>

Hello All forum members… This is my first posting in this forum.

I am working on a flash xml project and facing some problem… I need your help to solve this.

I am making a site, there is a list of buttons coming from an xml file and showing in the left side of the page. At a time I have to show only 12 buttons. there is a next and back button under the list. and on clicking on the next btn the next 12 buttons will appear.

The buttons are showing properly. but I can not restrict them in 12 at a time, I don’t know how to do the pagination properly.

I am attaching the actionscript I am using

the code in the 1st frame

```auto
 
var yPos = 50;
var depthCount = 1;
var linksXML = new XML();
linksXML.ignoreWhite = true;
linksXML.load("left_rings.xml");
linksXML.onLoad = checkLoading;
function checkLoading(success) {
if (success == true) {
var rootNode = linksXML.firstChild;
var total = rootNode.childNodes.length;
//var current = 12;
//Load the links Text
var tLink = rootNode.firstChild;
for (i=0;i<total;i++) {
createLink("tLink" + i, tLink);
var totalInner = tLink.childNodes.length;
var tnLink = tLink.firstChild;
for (j=0;j<totalInner; j++){
	createLink("tnLink" + j + ""+ i, tnLink);
	tnLink = tnLink.nextSibling;
}
tLink = tLink.nextSibling;
}
gotoAndStop(2);
}
}
function createLink(newObj, aNode){
duplicateMovieClip(_root.baseLink, newObj, depthCount++);
var tcl = eval(newObj);
tcl.aLink = aNode.attributes.ref;
yPos +=15
if (aNode.nodeName == "menu"){
setName(tcl, aNode.attributes.name, 1);
tcl._x = 20;
}
else{
setName(tcl, aNode.attributes.name, 0.95);
tcl._x = 25;
}
tcl._y = yPos;
 
}
gotoAndStop(1);
function setName(obj, theName, Size){
obj._height = obj._height*Size;
obj._width = obj._width*Size;
obj.TextLink.BoxName.text = theName;
obj.TextLinkShadow.BoxName.text = theName;
obj.embedFonts = true;
//obj.TextLinkShadow._alpha = 20;
}
 

```

The code in the 2nd frame

```auto

stop();
duplicateMovieClip(_root.text2, "text4", 4);
//text3._x = 0;
text4._y-=50;
//text3.setName("Nada");
setName(text4, "Nada");
setName(text2, "Todo");

```

this is the xml

```auto

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> 
<links>
<menuL name=" - Paris" ref="-50"/>
<menuL name=" - Starlight" ref="-215"/><!-- -50-165*1 -->
<menuL name=" - Eternity" ref="-430"/><!-- -50-165*2 -->
<menuL name=" - Spirit" ref="-642"/><!-- -50-165*3 -->
<menuL name=" - Forever" ref=""/>
<menuL name=" - Royalty" ref=""/>
<menuL name=" - Princess" ref=""/>
<menuL name=" - Summer" ref=""/>
<menuL name=" - Lovelite" ref=""/>
<menuL name=" - Florence" ref=""/>
<menuL name=" - Moonstruc" ref=""/>
<menuL name=" - Heartlight" ref=""/>
<menuL name=" - Xponse" ref=""/>
<menuL name=" - Salim" ref=""/>
<menuL name=" - Flash" ref="f"/>
<menuL name=" - XML" ref=""/>
<menuL name=" - Heartlight" ref=""/>
</links>
 

```

Please help me solve this problem…

Thank you in advance…
