# Set scrollPane boundries

**URL:** <https://forum.kirupa.com/t/set-scrollpane-boundries/201378>\
**Category:** Uncategorized\
**Created:** [September 20, 2006, 7:50pm UTC](https://forum.kirupa.com/t/set-scrollpane-boundries/201378 "2006-09-20T19:50:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)\
**Post date:** [September 20, 2006, 7:50pm UTC](https://forum.kirupa.com/t/set-scrollpane-boundries/201378/1 "2006-09-20T19:50:37Z")

</div>

If I load a movieClip into my scrollPane, how do I set the boundries so the movieClip stays inside the scrollPane? I am using this code to get the scrollPane boundries.

ActionScript Code:  
[FONT=Courier New][LEFT]\</p\>  
\<p\>var bounds\_obj:[COLOR=#0000ff]Object[/COLOR] = room.[COLOR=#0000ff]getBounds[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\>for [COLOR=#000000]([/COLOR][COLOR=#000000] **var** [/COLOR] i [COLOR=#0000ff]in[/COLOR] bounds\_obj[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
\<p\> [COLOR=#0000ff]trace[/COLOR][COLOR=#000000]([/COLOR]i+[COLOR=#ff0000]" --\> "[/COLOR]+bounds\_obj[COLOR=#000000][[/COLOR]i[COLOR=#000000]][/COLOR][COLOR=#000000])[/COLOR];\</p\>  
\<p\>[COLOR=#000000]}[/COLOR]\</p\>  
\<p\>  
[/LEFT]  
[/FONT]
