1 Reply Latest reply: Apr 22, 2009 5:55 AM by Ned Murphy RSS

    Loading more images and resizing.

    rahimhaji Community Member

      dear friends,

       

      iam trying to insert more consequtive images. the names of the images available in ana array imgarray. here my problem is. it is loading and resizing only hte last image. except last i cannot see any other images is not getting load..

       

      pls help me. find below the code i used. i want to close the movieclip (masterimg) and load the images from array. pls help me i got struct up.

       

      function fillimage() {
          var yp:Number = 10;
          for (var m:int = 0; m<=2; m++) {
              var im:masterimg = new masterimg();
              im.x = -100;
              im.y = yp;
              var pictURL:String = imgarray[m];
              var pictLdr:Loader = new Loader();
              trace(pictURL);
              var pictURLReq:URLRequest = new URLRequest(pictURL);
              pictLdr.load(pictURLReq);
              pictLdr.contentLoaderInfo.addEventListener(Event.INIT, onInit);
              function onInit(evt:Event):void {
                  im.addChild(pictLdr);
              }
              this.addChild(im);
              yp= yp+150;
          }
      }

       

      Thanks and Regards,