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 :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by