AS3 try/catch out of memory
Posted
by
StfnoPad
on Stack Overflow
See other posts from Stack Overflow
or by StfnoPad
Published on 2009-11-09T18:15:42Z
Indexed on
2011/01/13
11:53 UTC
Read the original article
Hit count: 218
Hi,
I'm loading a few huge images on my flex/as3 app, but I can't manage to catch the error when the flash player runs out of memory.
Here is the what I was thinking might work (I use ???? because i dont know what to catch):
try{
images = new Array(frames);
for (var i:uint = 0; i < frames; i++){
imagesBA[i] = new BitmapData(width, height, false, 0x000000FF);
}
}
catch(error:????){
Alert.show("Out of memory!");
}
Any idea what ???? can be?
Or does anyone knows how to catch when there is no memory for a variable?
© Stack Overflow or respective owner