4 Replies Latest reply on May 30, 2007 10:56 PM by zibber

    bitmap caching

    zibber Level 1
      Wondered if someone could give me some advice. I am working ona project where a user can pick an avatar and enter chatrooms. The idea is to display the avatrs to represent people in the different rooms. Currently there are around 25 different heads and bodies (which can be mixed andmatched) and 6 different images for a character. I currently have a nested movie clip that pulls in info form xml and the structure of the clip is something like:

      frame that loads in intial fornt facing head and body into seperate clips
      frame that houses a "walker clip". this contains 4 movie clips one for the head and 3 for each frame of walk animation

      Ideally i would like to be able to cache these images so i am not downlaoding the same assets over and over. Can someone point me in right direction to acheive this? the simpler the better;) I.e would it be as easy as jsut checking the runtime bitmap cache on the properties box for each moivie clip? Or is that overly optmisitc (namely bitmpa cache shouldt be usedofr animation?) and i need to do soemthing more extensive? any help would be great here.

        • 1. Re: bitmap caching
          Damon Edwards Level 3
          my_mc.cacheAsBitmap = true;
          • 2. Re: bitmap caching
            zibber Level 1
            Cheersfor response

            but will this work fine even though there will be three animation frames, i read that it coul dbe detremental?


            • 3. Re: bitmap caching
              kglad Adobe Community Professional & MVP
              the cacheAsBitmap property of movieclips is used to retrieve a movieclip bitmap from memory instead of requiring the flash player to (re)render the bitmap repeatedly. that's only helpful in certain situations including (but not limited) to a movieclip that's not changing frames.

              if you mean you want to cache some asset so it doesn't need to be repeatedly downloaded that happens automatically with flash unless you take steps to prevent it and has nothing to do with the cacheAsBitmap property of movieclips.
              • 4. Re: bitmap caching
                zibber Level 1
                ah ok cheers.

                so...........the way i a have my clips set up so that they load the relevant frames in from xml.... I(t literally does an xml call duplicates as many avatar holders as needed and then loads int he right body parts) will these loads be ignored if those images are already cached? I just want to make sure i reduce as much overhead as possbile.

                thanks in advance