PDA

View Full Version : caching images


kifah
08-05-2007, 12:27 PM
Hello All

does anyone know how can I save my loading images in cach (using Flex or Actionscript 3.0)?
I have to load 300 images using loader and animate them in slider
so when the effect finish the first image must appear again but It seems to be removed from cach..

thanks in advance

noahgenius
08-06-2007, 08:32 AM
load 300 images!!! so many for cach.
if some image has no use, just removeChild it(as3), it will not remove from the memory but you must make sure it will not be delete by GC.

kifah
08-06-2007, 09:05 AM
Actually I use removeChild to delete the images out of the stage
but if you got my point
when the image must appear again in the stage it' seems deleted from cach.

noahgenius
08-07-2007, 04:39 AM
did u use addChild again?
please show me some codes if possible:rolleyes:

kifah
08-07-2007, 04:42 PM
off course i use addChild and then when effect done I use removeChild
to delete the unwanted images ..
but what i was asking for to keep all my loaded images in client cach even if the count of the images is large
anyway
Thanks for helping
I solved my problem in other way ( i created Optimizedloader class that load 10 images every period time ) ..etc
..