Hi Percy,
Sounds like you need to keep it from caching if only to test.
Like Glen said in his tips, try the ?" + new Date().getTime(); when calling the image. Flash is most likely caching all the images and if you are fetching a grandios number of them, well flash is going to be reading all those files every time until its cleared or garbaged. If your storing 100,000+ every time, then the build up to a player stall is inevitable.
At least that sounds right to me.. :)

I've used ImageLoader and set a while loop that only continued unless incremented once the previous was at a ready state.
Went very smoothly.

Another thing you can do if you WANT to cache the images is set a .httaccess in your image directory that sets an expiration on images that are cached.
Or even a cookie. Then flash can't cache everything forever,
but if a user goes back to the same search, their results will open quickly for a period of time.
Then the images are collected by the garbage man sooner than later.
This may help in performance areas whereas the no-cache method may be a little intensive or take a min
as you will always be downloading new images.

For Apache:
http://www.askapache.com/htaccess/apache-speed-compression.html

For .httaccess
http://www.bloghash.com/2006/11/beginners-guide-to-htaccess-file-with-examples/
http://www.catswhocode.com/blog/awesome-wordpress-hacks-to-make-your-blogger-life-easier
(look at the bottom for .httaccess image caching)

and then there is the option of loading per wither it has a status of 200 or not.

HTH,

Best,
Karl


On Oct 12, 2011, at 3:13 AM, Glen Pike wrote:

Hi,

We have had similar issues loading images this way - we cannot stream from our image server program so Flash loads the same image into 2 movie clips swapping them whilst the server saves to the same image.

To solve some difficulties with refreshing, so we used a cache- killer method, e.g. var url:String = "http://imageserver/image.jpg?"; + new Date().getTime();

We also had some problems loading one image when the first one had finished, so I used setTimeout inside the onLoadInit handler to delay calling of loading the next image.

Our server also caused problems - apache could not read the image when the server was writing it, so the programmer wrote to a 2nd image, then renamed it to our desirable one, but this might not affect you.

   Hope some of these tricks may help.

   Glen



On 11/10/2011 23:42, [p e r c e p t i c o n] wrote:
Hi All,

I'm working on a project in which I continuously grab images from a server
(don't ask..) using MovieClipLoader.
everything works fine for a period of days then suddenly the player crashes
with the dreadful "..script to run slowly..." dialog.
when I check my servers logs, i notice that the server at some point earlier than the crash, started to send 304 (http status - means the document hasn't been modified) as opposed to status code 200 (ok - document was found..)

has anyone else encountered this? and if so, what headers might the flash
player be sending to trigger this?

anyone with in-depth knowledge of the headers flash sends?

Thx,

percy


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Karl DeSaulniers
Design Drumm
http://designdrumm.com

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to