开发者

Is there a way to determine if Flash has cached an object?

Greetings,

I am writing a networked flash application. The server (an independent C++ app) sends resources for the flash client to manipulate and/or display, eg, images and sound. I'm assuming that the browser stores these resources in its cache. Since the resources can be pretty big, I don't want to resend them from the server each time the client restarts the app. I can't use the LSO (flash cookies) because those won't update if the cache gets independently cleared by the browser or the user.

So for the flash gurus.. 1) Is there a way to detect if an item has been cached, eg to query the browser cache开发者_如何学编程 for a crc or something? Maybe load the object offscreen and (somehow) detect if it shows up? -OR- 2) Is there a way to avoid using the normal browser cache and cache things myself, in some kind of larger LSO?

Thanks for the help.


no you can't. but if you have a preloader for the resources, so the user sees something is loading it should do just fine. if the resources are already in the cache, then they won't see the preloader, the app will just appear. and the request for the images/sounds won't be made to the server so no traffic there. if they aren't in the cache, they will see the preloader so you're exactly there to begin with. i see no reason why you are trying to manipulate the cache in any way in your case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜