# Add movie clip to scrollpane

**URL:** <https://forum.kirupa.com/t/add-movie-clip-to-scrollpane/299253>\
**Category:** Uncategorized\
**Created:** [November 2, 2009, 6:48am UTC](https://forum.kirupa.com/t/add-movie-clip-to-scrollpane/299253 "2009-11-02T06:48:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cera2001](https://avatars.discourse-cdn.com/v4/letter/c/cdc98d/32.png) [@Cera2001](https://forum.kirupa.com/u/Cera2001)\
**Post date:** [November 2, 2009, 6:48am UTC](https://forum.kirupa.com/t/add-movie-clip-to-scrollpane/299253/1 "2009-11-02T06:48:52Z")

</div>

I am new to actionscript 3.0 and am having problems when adding a scrollpane to my flash file. I want to scroll a movie clip. My scrollpane instance is aSp and my movie clip name is vendor\_scroll. This is what I have:

import fl.events.ScrollEvent;

aSp.setSize(245, 458);

function scrollListener(event:ScrollEvent):void {  
trace("horizontalScPosition: " + aSp.horizontalScrollPosition +  
", verticalScrollPosition = " + aSp.verticalScrollPosition);  
};  
aSp.addEventListener(ScrollEvent.SCROLL, scrollListener);

aSp.source = vendor\_scroll;

this.aSp.horizontalScrollPolicy = “off”;

\*\*\*And this is the error message I am receiving:  
TypeError: Error #2007: Parameter child must be non-null.  
at flash.display:isplayObjectContainer/addChildAt()  
at fl.controls::BaseButton/drawBackground()  
at fl.controls::LabelButton/draw()  
at fl.core::UIComponent/callLaterDispatcher()

Any help would be greatly appreciated!
