Package import dynamic movie clip problem

I have a package (XMLThumbLoader) that loads thumbnails and is supposed to import a scroller class(DSIScroller).

The thumbloader works fine, but when I try to scroll the thumbsContainer movie clip, I get “Error #1009 Cannot acces a property or method of a null object reference”.

Notice that I instantiated the DSIScroller class near the end of the main package instead of underneath the import DSIScroller command. By doing this, my thumbnails show up. If I place the instantiation right under the import command, no thumbs show…

I believe the issue is with the dynamically created movie clip: thumbsContainer.

Here is the main package (XMLThumbLoader)

package {
	import flash.xml.*;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.geom.Rectangle;
	import flash.display.*;
	import flash.text.*;
	public class XMLThumbLoader extends MovieClip{
		public function XMLThumbLoader(){
			import DSIScroller;
			var thumb_width:Number;
			var thumb_height:Number;
			var thumbs_x:Number;
			var thumbs_y:Number;
			var my_videos:XMLList;
			var my_total:Number;

			var thumbsContainer:Sprite;
			var thumbs:Sprite;
			var titles:Sprite;
			var vidDesc:Sprite;
			var vidLink:Sprite;

			var myXMLLoader:URLLoader = new URLLoader();
			myXMLLoader.load (new URLRequest("playlist.xml"));
			myXMLLoader.addEventListener (Event.COMPLETE, processXML);
			var videoFont:Font = new VidDescFont();


			function processXML (e:Event):void {
				var myXML:XML = new XML(;
				thumb_width = [email protected]_WIDTH;
				thumb_height = [email protected]_HEIGHT;
				thumbs_x = [email protected]_X;
				thumbs_y = [email protected]_Y;
				my_videos = myXML.vid;
				my_total = my_videos.length();
				makeContainers ();
				callThumbs ();

function makeContainers ():void {
	thumbsContainer = new Sprite();
	addChild (thumbsContainer);
	thumbs = new Sprite();
	//thumbs.addEventListener (MouseEvent.CLICK, playClicked);
	thumbs.addEventListener (MouseEvent.MOUSE_OVER, onOver);
	thumbs.addEventListener (MouseEvent.MOUSE_OUT, onOut);
	thumbs.x = thumbs_x;
	thumbs.y = thumbs_y;
	thumbs.buttonMode = true;
	thumbsContainer.addChild (thumbs);
	titles = new Sprite();
	titles.x = thumbs_x;
	titles.y = thumbs_y;
	vidDesc = new Sprite();
	vidDesc.x = thumbs_x;
	vidDesc.y = thumbs_y;
	thumbsContainer.addChild (titles);
	thumbsContainer.addChild (vidDesc);

function callThumbs ():void {
	for (var i:Number = 0; i < my_total; i++) {
		var thumb_url = my_videos*[email protected];
		var thumb_loader = new Loader(); = i;
		thumb_loader.load (new URLRequest(thumb_url));
		thumb_loader.contentLoaderInfo.addEventListener (Event.COMPLETE, thumbLoaded);
		thumb_loader.y = (thumb_height+10)*i;
		thumb_loader.alpha=0.5; //set initial thumb alpha
		var thumb_title = my_videos*[email protected];
		var title_txt:TextField = new TextField();
		title_txt.antiAliasType = AntiAliasType.ADVANCED;
		title_txt.text = thumb_title;
		title_txt.wordWrap = true;
		title_txt.embedFonts = true;
		title_txt.y = thumb_loader.y+4;
		title_txt.x = thumb_width + 7;
		title_txt.width = 180;
		titles.addChild (title_txt);
		var desc_var = my_videos*[email protected];
		var desc_txt:TextField = new TextField();
		desc_txt.antiAliasType = AntiAliasType.ADVANCED;
		desc_txt.text = desc_var;
		desc_txt.wordWrap = true;
		desc_txt.embedFonts = true;
		desc_txt.y = (thumb_loader.y+vtf.size)+10;//make sure description text is set below title txt using title size plus a "cushion" of 8 pixels
		desc_txt.x = thumb_width + 7;
		desc_txt.width = 180;
		vidDesc.addChild (desc_txt);
	//add thumbTile
		var thumbTile:Tile = new Tile();
		thumbTile.y = (thumb_height+10)*i;
		thumbTile.width=(desc_txt.width+thumb_width+15);//ensures tile graphic width does not fall short of description text
		track.y = contentMask.y;
		handler.y = track.y + 10;
		thumbsContainer.x = track.x -thumbsContainer.width- 25;
		thumbsContainer.y=track.y - thumbs_y+2;

function thumbLoaded (e:Event):void {
	var my_thumb:Loader = Loader(;
	thumbs.addChild (my_thumb);	

var sc:DSIScroller =new DSIScroller(handler, track, thumbsContainer);
		}//end function
	}//end class
}//end package

The imported scroller (DSIScroller)

package {
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.geom.Rectangle;
	import flash.display.*;
	import flash.text.*;
	import gs.TweenLite;
	import fl.motion.easing.*;
	import fl.transitions.*;
	import fl.transitions.easing.*;

	public class DSIScroller extends MovieClip{
		public function DSIScroller(handler:MovieClip, track:MovieClip, thumbsContainer:Sprite){
			/*** Scrollbar ***/

			//on click, start scrolling
			function startScroll(event:MouseEvent):void {
				handler.startDrag(false, new Rectangle(track.x, track.y+10, 0, track.height-handler.height-20));, 0.5, {y:"0", ease:Regular.easeOut});
				stage.addEventListener(Event.ENTER_FRAME, scrollGo);

			//on mouse up, stop scrolling
			function stopScroll(event:MouseEvent):void {
				stage.removeEventListener(Event.ENTER_FRAME, scrollGo);

			//move thumbsContainer
			function scrollGo(event:Event):void {													//90 determines how far up last thumb will place, 0.5, {y:Math.round(track.y-(thumbsContainer.height-(track.height+110-handler.height))*((handler.y-track.y-10)/(track.height-20-handler.height))), ease:Regular.easeOut});

			//*************** Events ***************//
			handler.addEventListener(MouseEvent.MOUSE_DOWN, startScroll);
			stage.addEventListener(MouseEvent.MOUSE_UP, stopScroll); 
		}//end DSIScroller function
	}//end DSIScroller
}//end package

Sorry for the length. Any help would be appreciated.