2 Replies Latest reply on Dec 23, 2010 3:33 AM by Astraport2012

    How to embed to the project a lot of pictures?

    Astraport2012

      I use a lot of images in my project (about 100-120, 10-30 kB each). Images are on the server and loading (source = "mediayes.png") and display on the window by clicking on the button. There is a delay due to the large number of images (7-10 s). I created a class to connect images to the project:

       

      package

      {

      import spark.primitives.BitmapImage;

       

      public class embedpng

      {

      [Embed(source="media/yes.png")]

      [Bindable] public var image1:BitmapImage;

      [Embed(source="media/no.png")]

      [Bindable] public var image2:BitmapImage;

      ........................................

      ........................................

      [Embed(source="media/ya.png")]

      [Bindable] public var image110:BitmapImage;

      }

      }

       

      Calling a class in the main MXML:

      import embedpng;

       

      However, this does not remove the delay and size of the swf is not increased compared to the same. How do I solve the problem with fast loading images? Thank you.

        • 1. Re: How to embed to the project a lot of pictures?
          aktell2007 Level 1

          I'm not quiet sure if I understand this one right ?

           

          1) A lot of Images ? What has that to do with anything ???

           

          B) 10 to 30 kb each !  ???

           

          C) (There is a delay due to the large number of Images) - I don't think so - If there is a delay of 7 to 10 seconds than there is for sure something else very wrong !

          And why embedding Images except Icons etc. is beyond me, Sorry.Maybe a couple for starters but for sure not the lot others could load while say reading the page etc.

          I have myself many galleries of Images on a server which are normaly 120 to 180 kb going up to maybe 240 kb each, and yes I do have a slide delay at the first showing but surely not after that at all. regards aktell

          • 2. Re: How to embed to the project a lot of pictures?
            Astraport2012 Level 1

            Yes, you're right, I do not explain everything. There are several XML with templates. In each of the path to the images (source="media/yes.png"). A delay of 7-10 seconds only the first time, then 1-2 seconds.