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!