# How To Pad Scrollpanes

**URL:** https://forum.kirupa.com/t/how-to-pad-scrollpanes/60587
**Category:** flash
**Created:** [August 10, 2004, 11:43pm UTC](https://forum.kirupa.com/t/how-to-pad-scrollpanes/60587 "2004-08-10T23:43:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Lukus](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lukus/32/683_2.png) [@Lukus](https://forum.kirupa.com/u/Lukus)
#### Post date: [August 10, 2004, 11:43pm UTC](https://forum.kirupa.com/t/how-to-pad-scrollpanes/60587/1 "2004-08-10T23:43:20Z")

</div>

Hey

I loaded some dynamic content into a scrollpane, and eventually got it to scroll. But it was pushed right against the edges of my scrollpane and looked ugly.

I was determined to find out how to pad the scrollpane, so I started editing various parts of the scrollpane FUI…and I got it! :pleased: 😛

Here’s what ya have to do …  
[list=1]  
[_]Open up the Scrollpane MC in the library  
[_]Click on frame 1 of the actions layer and open the actions panel  
[_]Underneath “// ::: FScrollPaneClass” add “customPaddingVar = 20 ;”  
[_]Scroll to lines 78+79 and use:

```auto
this.offset.x = -customPaddingVar;
this.offset.y = -customPaddingVar;

```

[\*]Scroll to lines 114+115 and change the lines to:

```auto
this.contentWidth = this.content_mc._width+(2*customPaddingVar);
this.contentHeight = this.content_mc._height+(2*customPaddingVar);

```

[\*]Go back to your main movie and watch your nice newly padded scrollpane  
[/list]😃 Just change the variable at the top of the class and your whole padding changes. Ingenious. I’m really proud of myself now 😛

Thought I’d post as I’ve seen other ppl ask the question on various forums and no one has been able to reply 🙂

Let me know if this is any use to anyone  
Cheers  
Luke =]
