1573 posts
  • 7 Years of Membership
  • Affiliate Level 1
  • Author Level 2
  • Collector Level 2
+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
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 4
  • Collector Level 2
+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