# Loader problem

**URL:** <https://forum.kirupa.com/t/loader-problem/323337>\
**Category:** Uncategorized\
**Created:** [June 26, 2011, 12:49pm UTC](https://forum.kirupa.com/t/loader-problem/323337 "2011-06-26T12:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ersenaskin](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@ersenaskin](https://forum.kirupa.com/u/ersenaskin)\
**Post date:** [June 26, 2011, 12:49pm UTC](https://forum.kirupa.com/t/loader-problem/323337/1 "2011-06-26T12:49:46Z")

</div>

Hello, as you can understand, I am so new to AS3… nothing happens when i run the code 🙂

This is my Document Class…

```auto
package {
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	import ImageLoader;

	public class LoadMainClass extends MovieClip
	{
		public var _imageLoader:ImageLoader;
		
		public function LoadMainClass() 
		{
			// constructor code
			_imageLoader = new ImageLoader("ss.jpg");
		}		
	}
}

```

and Image Loader Class…

```auto

package 
{
	import flash.net.URLRequest;
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.events.Event;

	public class ImageLoader extends MovieClip
	{
		public var fileLoader:Loader;

		public function ImageLoader(path:String)
		{
			// constructor code
			fileLoader = new Loader ();
			fileLoader.load(new URLRequest(path));
			fileLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fileComplete);
		}
		
		public function fileComplete(event:Event):void
		{
			this.addChild(fileLoader.content);
		}
	}
}

```
