7 Replies Latest reply on Feb 22, 2010 7:03 AM by kglad

    Loading images...


      I'm creating a new gallery, where I carry the information (location of the pictures, title, id ...) through an XML, I created a class for it and so far so sure. But to add the images I'm using a command for making the process very heavy, I know another way to make the loading of images ... Below is the snippet I'm using to load the images:



      for (var i:Number = 0; i < evt.currentTarget.getXml.children().length(); i++) {

           for (var j:Number = 1; j <= 24; j++) {

                var urlRequest:URLRequest;

                urlRequest = new URLRequest(urlImage);



                loader = new Loader();






      private function onCompleteLoader(evt:Event):void {



           imagens[0] = evt.currentTarget.content;

           dispatchEvent(new Event(Event.COMPLETE));