# Populating a scrollPane

**URL:** <https://forum.kirupa.com/t/populating-a-scrollpane/150083>\
**Category:** flash\
**Created:** [June 3, 2005, 3:58pm UTC](https://forum.kirupa.com/t/populating-a-scrollpane/150083 "2005-06-03T15:58:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gumby19](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gumby19](https://forum.kirupa.com/u/Gumby19)\
**Post date:** [June 3, 2005, 3:58pm UTC](https://forum.kirupa.com/t/populating-a-scrollpane/150083/1 "2005-06-03T15:58:00Z")

</div>

For Example: I was using this code to populate a scrollpane using setScrollContent() in **FlashMX**. setScrollContent() does not seem to be a function in \*\*MX2004. \*\*Is there a substitute? Also, how can I edit the scrollpane in **MX2004,** for example getting rid of the border? Thanks.

```auto

createEmptyMovieClip("news", 1);
 for (i=0; i<headlinesXML.childNodes[0].childNodes[a].childNodes.length; i++) {
  clip = news.attachMovie("News Item", "newsItem"+i, i);
  currentHeadline = headlinesXML.childNodes[0].childNodes[a].childNodes*.childNodes[0].childNodes[0].nodeValue;
  clip.currentHeadline = currentHeadline;
  clip.link = headlinesXML.childNodes[0].childNodes[0].childNodes*.childNodes[2].childNodes[0].nodeValue;
  clip.item.htmlText = "• <b>"+currentHeadline+newline+"</b>";
  clip.item.autoSize = true;
  clip._y = yPos;
  yPosArray.push(clip._y);
  yPos = clip._y+clip._height+newsSpacing;
	}
newsStuff.newsBox.setScrollContent(news);

```
