# ScrollPane

**URL:** <https://forum.kirupa.com/t/scrollpane/239623>\
**Category:** Uncategorized\
**Created:** [September 24, 2007, 10:08am UTC](https://forum.kirupa.com/t/scrollpane/239623 "2007-09-24T10:08:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fede2008](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@Fede2008](https://forum.kirupa.com/u/Fede2008)\
**Post date:** [September 24, 2007, 10:08am UTC](https://forum.kirupa.com/t/scrollpane/239623/1 "2007-09-24T10:08:11Z")

</div>

This is my prob: :ponder:

I want to load swf into a scrollpane. I use this code but I have  
some problems:

This code places a scrollpane on the stage. Is there a way to already  
have a scrollpane on the stage and just change its content from actionscript? That would solve my other problem: having one scrollpane  
over another - I want to replace its contect, not having another over it-  
that’s what this code does)

I hope what I’m saying makes sense to you :puzzle:

[COLOR=darkred]newsbtn.addEventListener(  
MouseEvent.MOUSE\_UP,  
function(evt:MouseEvent):void {  
[/COLOR]  
[COLOR=darkred] import fl.containers.ScrollPane;  
var [/COLOR][[COLOR=darkred]url:String[/COLOR]](http://www.kirupa.com/forum/String)[COLOR=darkred] = “news.swf”;  
var aa:MovieClip = new MovieClip();  
var bb:Loader = new Loader();  
bb.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);  
function completeHandler (e:Event)  
{  
var myScrollPane:ScrollPane = new ScrollPane();  
myScrollPane.setSize (320, 240);  
myScrollPane.move (10, 10);  
myScrollPane.source=aa;  
addChild (myScrollPane);

```
} 
bb.load (new URLRequest(url)); 
aa.addChild (bb); 

```

}  
);[/COLOR]
