[flexcoders] How do I get an array of Images

2010-01-18 Thread criptopus
var imgArray:Array = new Array();

imgArray.push(new Image());

imgArray[imgArray.length].percentWidth=50;

imgArray[imgArray.length].source=/media/Image.png;

imgArray[imgArray.length].addEventListener(Event.COMPLETE, 
AdjustImageDimensions);

etc.

I just dont get it, can someone elusidate me on how its done!





Re: [flexcoders] How do I get an array of Images

2010-01-18 Thread Paul Andrews
criptopus wrote:
 var imgArray:Array = new Array();

 imgArray.push(new Image());

 imgArray[imgArray.length].percentWidth=50;

 imgArray[imgArray.length].source=/media/Image.png;

 imgArray[imgArray.length].addEventListener(Event.COMPLETE, 
 AdjustImageDimensions);

 etc.

 I just dont get it, can someone elusidate me on how its done!
   
Just to get you started, Arrays start from 0 not 1..