1567 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • India
  • Referred between 1 and 9 users
  • Sold between 100 and 1 000 dollars
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
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Netherlands
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
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