i need a lil help with a for loop.
this is ONLY my for loop not my whole script.
and without the "for" it loads a single picture perfectly fine, but i would like to loop it to load all photos...
this is all as3
(i called vars into flash like numpics, it gives the number of pics so yeah a little note)
for (var i:int=0; i<=numpics;i++){
var picLoader:Loader = new Loader();
var picknum= event.target.data.numpic;
xPos = event.target.data.picx;
yPos = event.target.data.picy;
var photoRequest:URLRequest = new URLRequest("/storage/photos/" +picknum+ ".swf");
picLoader.load(photoRequest);
function loadPics (event:Event) {
var myClip:MovieClip = event.target.content;
myClip.photo_mc.x = xPos;
myClip.photo_mc.y = yPos;
addChild(myClip);
}
}
picLoader.contentLoaderInfo.addEventListener(Event .COMPLETE, loadPics );