# X and Y Spacing of a Dynamic List

**URL:** <https://forum.kirupa.com/t/x-and-y-spacing-of-a-dynamic-list/74604>\
**Category:** flash\
**Created:** [December 30, 2004, 8:37pm UTC](https://forum.kirupa.com/t/x-and-y-spacing-of-a-dynamic-list/74604 "2004-12-30T20:37:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neiro](https://avatars.discourse-cdn.com/v4/letter/n/ebca7d/32.png) [@neiro](https://forum.kirupa.com/u/neiro)\
**Post date:** [December 30, 2004, 8:37pm UTC](https://forum.kirupa.com/t/x-and-y-spacing-of-a-dynamic-list/74604/1 "2004-12-30T20:37:28Z")

</div>

I have a dynamic data being pulled in from a database using flash remoting. I am pulling these variables:

newsID, newstxt and newstitle

newsID  
newstitle is a single line dynamic textbox  
newstxt is a multiline dynamic textbox

I want to pull all the data from the news table and display it. This is what Im trying to do.

ID =1  
Newstitle  
Newstxt  
\*Need to set ID = 2 a certain amount of space from where newstxt textbox ends  
ID =2  
NewsTitle  
Newstxt

Here is the code I have now.

getTitles\_Result = function(rs){  
cant = rs.getLength()  
for(var i=0; i\<cant; i++){  
News.duplicateMovieClip(“newslist”, “newslist”+i, i)  
News[“newslist”+i].\_y = (News[“newslist” + (i-1)].\_y + News[“newslist” + (i-1)].\_height) + 2  
}  
News[“newslist”+i].newsID = rs.getItemAt(i).newsID  
News[“newslist”+i].newstitle.htmlText = “\<b\>”+rs.getItemAt(i).newstitle+"\</b\>"  
News[“newslist”+i].newstxt.htmlText = “\<b\>”+rs.getItemAt(i).newstxt+"\</b\>"

}

That the is just spacing a certain number. How do I change the code above to get what I need.

Thanks,

chad
