# \[AS2\]Movieclip positioning and pagination problem

**URL:** https://forum.kirupa.com/t/as2-movieclip-positioning-and-pagination-problem/317376
**Category:** flash
**Created:** [December 18, 2010, 10:13am UTC](https://forum.kirupa.com/t/as2-movieclip-positioning-and-pagination-problem/317376 "2010-12-18T10:13:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![akshayhack0123](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@akshayhack0123](https://forum.kirupa.com/u/akshayhack0123)
#### Post date: [December 18, 2010, 10:13am UTC](https://forum.kirupa.com/t/as2-movieclip-positioning-and-pagination-problem/317376/1 "2010-12-18T10:13:24Z")

</div>

i am trying to do some xml based driven search. i am right now stuck with positioning of movieclip inside movieclip and pagination for the same.Since the data is going beyond main movieclip container. i have just started actionscripting. Could anyone help me out please

```php
on (press) {
	var getSearch = myText.text;
	trace(getSearch);
//	trace(myText.text);
//	gotoandstop(getSearch);
	
var j = 0;	
var mySearchXML = new XML();
mySearchXML.ignoreWhite = true;
mySearchXML.load("searchXML.xml");

mySearchXML.onLoad = function() {
_root.myData = mySearchXML.firstChild.childNodes;
_root.myTotalData = myData.length;

loadresults();

};

_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());

container_mc._x = 50;
container_mc._y = 50;
container_mc.width = 300;
container_mc.height = 300;

function loadresults(){
	

for (i=0; i<_root.myTotalData; i++) {

xmlData = myData*.attributes.search_text;

if(xmlData.indexOf(getSearch) != -1)
{
//xmlAction = myData*.attributes.action;

//trace(xmlData);

mySearchResults_mc = container_mc.createEmptyMovieClip(j, container_mc.getNextHighestDepth() );
mySearchResults_mc._x = 50;
mySearchResults_mc._y = 50+((j+1)*20);
mySearchResults_mc.buttonMode = true;
//trace(mySearchResults_mc._x);
//trace(mySearchResults_mc._y);

mySearchResults_mc.createTextField("my_txt",mySearchResults_mc.getNextHighestDepth,0,0,100,40);
mySearchResults_mc.my_txt.text = xmlData;
mySearchResults_mc.my_txt.selectable = false;

j++;
}
mySearchResults_mc.onPress = function()
{
	gotoandstop(myData[this._name].attributes.action);
//	trace(myData[this._name].attributes.action);
}

}
}

}

```
