Hello
I'm writing custom flex preloader with extends IPreloaderDisplay class. How I can load the images from web in my custom preloader?
Thanks Vladimir
Hello
I'm writing custom flex preloader with extends IPreloaderDisplay class. How I can load the images from web in my custom preloader?
Thanks Vladimir
Can't you just create an image object and add it to the stage? Can you post your progess so I know which part of this to help you with?
UPDATE
Here is a general solution for the time being:
this.loader = new Loader();
this.loader.load("http://somewebsite.com/image.png");
this.loader.addEventListener(Event.COMPLETE, onLoadComplete);
public function onLoadComplete(event:Event):void {
var thumbnail:Sprite = new Sprite();
thumbnail.addChild(this.loader);
}
You can't load your preloader images from the web because the framework hasn't loaded. You need to keep preloaders VERY lightweight and don't use any framework code. Just extend Sprite and implement the IPreloaderDisplay methods but embed your images and don't attempt to load them at runtime.