2 Replies Latest reply on Jun 17, 2010 2:42 PM by rashmin.d

    Problem with multiple images

    jatin4rise

      I just have a question to ask , before i go against good programming practise.

       

      I have more than 20 images which uniquely refers to markers. So do i have to uniquely

      create an instance of Class and Embed a source of each image, 20 times, as i do for a single image.

       

      [Embed(source="images/abcd.png")]

      private var hotel:Class;

       

      Thanks for you feedback.

        • 1. Re: Problem with multiple images
          rtalton Level 4

          If they are small, go ahead and embed them. Otherwise, load them only when needed.

          • 2. Re: Problem with multiple images
            rashmin.d

            hi......

             

            u mention that 20 pics..... see its big or not... but it is not good that i embed 20 pics. in file... it make you swf file big n takes more time then dynamic way.....So, best way to do it is put in one folder n rename in serialize manner....n load them in for loop using Loader Class.. one by one.. it make 3 line code....... OR    if u cann't do the rename then Use the XML file to read the name n load images...

             

            i will hope it will help u....