1568 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
+2 more
rahulbist says

Hi everyone,

I have a lot of images(25) to be loaded.

I want to load them in sequence as in the xml file.

below is code I am using

var seqImage:Number = 0;

function loadimage():void

{

var loader:Loader = new Loader();

loader.load(new URLRequest(imageArray[seqImage]);

loader.addEventListener(Event.Complete,imageComplete);

}

function imageComplete(e:Event):void {

seqImage++;

if(seqImage == totImage)

{

dothis(); }

else

{

loadingimage();

}

}

Problem is my code is working for local images, the image on same server.

but, when I am trying to load remote image, loading stops after first image.

what is going wrong, please help me.

thanks in advance.

1955 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
Emroni says

First off, you dont need to create a new loader every time you want to load an image. Just one loader could load all the files.

Anyway, if you dont know what is going on, try adding a few more listeners for errors and trace those error messages. Might be crossdomain issues, or maybe something else. Using more listeners wont hurt :)

by
by
by
by
by
by