Hello, as you can understand, I am so new to AS3… nothing happens when i run the code
This is my Document Class…
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…
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);
}
}
}