Question
Load Images
Hello
Could you please assist me with such issue
I am using a Canvas object like a container for images (Image class). My application loads 500-1000 images (tiles) dynamically and then displays them. Everything works fine but the memory grows up to 300Mb.
Here is a code:
private function GetLoop(layer:String):void {
var canvas:Canvas = new Canvas();
for(var i:Number = 0; i < curFrames; i++) {
var img:Image = new Image();
img.addEventListener(Event.COMPLETE, OnImageLoaded); img.load(urlReq);
canvas.addChild(img);
}
}
Could you please assist me with such issue
I am using a Canvas object like a container for images (Image class). My application loads 500-1000 images (tiles) dynamically and then displays them. Everything works fine but the memory grows up to 300Mb.
Here is a code:
private function GetLoop(layer:String):void {
var canvas:Canvas = new Canvas();
for(var i:Number = 0; i < curFrames; i++) {
var img:Image = new Image();
img.addEventListener(Event.COMPLETE, OnImageLoaded); img.load(urlReq);
canvas.addChild(img);
}
}
