1 Reply Latest reply on Mar 3, 2007 5:51 AM by peterent

    about bitmap object

      i want to load my icons set from external png so that i can change/update them without recompile my swf.

      my question is:
      save those icons in separate files like icon_00.png, icon_01.png, icon_02.png
      and attach them to display object.

      or just save them in on big png (icons.png)
      then use copyPixel to draw to display object

      which way is better(faster and save memory)?
        • 1. Re: about bitmap object
          peterent Level 2
          It's kind of like 6-of-one, half-dozen of another problem. They kind of work out the same:

          Separate image files will make the browser issue multiple requests to the server. So that takes time and makes the server do more work (cost is minimal on servers that are optimized for this sort of thing).

          A single large image still has to download the same number of bytes, but in just one request. So it may be a tad faster. But then you lose what you've gained by copying the pixels.

          All in all, I'd use separate files and just save yourself the hassle of dealing with the copy aspect. Your time is also a resource. Plus, if you need to alter those images you'll have to recombine them.