well, surprisingly it does. maybe it is server-browser-flash problem
that it doesnt actually put file in cache, but - as end user of
masapi, in this case - why should I care? I want my files to be loaded
once even if cache doesnt work, and if I can enforce this in my code,
so can you in yours.
> Maybe can you show me some piece of code you're using.
>
I used 1st cml.addFile from examples, and then I expanded it into
var file:ILoadableFile = cml.createFile(url, LoadableFileType.SWF,
null, null, onLoaded);/// file.useCache = false;
(cml.massLoader as PriorityMassLoader).addPrioritizedFile (file, priority);
if (cml.massLoader.stateLoading) cml.massLoader.stop ();
cml.massLoader.start ();
in order to play with file.useCache, so now cml isn't really used.
yes. and that's the problem. are you saying that using cml.addFile
would work differently?
> In order to know if a ILoadableFile must be reloaded or not, Masapi does the
> following checks :
> [snip]
> - if bytesLoaded < bytesTotal => reload
the last check, in particular, makes no sense - why would you want to
restart anything that is already loading?
I'm not saying that it behaves contrary to its design ( that would be
a bug report).
I'm saying that it doesnt work to solve my problem :)
> And the last check is necessary because there is no way to manage the cache
> of the FlashPlayer... maybe when you call a load on a URLoader that is
> already 75% loaded, the FP will begin where it was or reload the whole stuf.
> Who knows ? So it is implementation-dependant and that force you to recall
> the load method on the object (and thus relaunch the loading of the file in
> masapi).
Yeah, well, I would be happy not to call stop/start but then again I
cannot add files unless I restart everything.
I have a bunch of images that are going to be loaded randomly on
"whenever the need comes" basis. So every time when an object that
requires this image is created, I simply call static function that
adds this object to "queue" for loading, and updates it with loaded
image at some point later. Same class is used by global preloader to
display itself when something is loading. I'm sure there will be oop
gurus saying this design is bad, but it keeps my code extremely simple
and makes me happy. However, in this class I now also have to track
all previous requests and filter duplicates before passing it to
masapi. I sorta hoped masapi does this for me, but it doesnt, that's
all I'm saying.
> Did you have a look on the ApplicationMassloader ?
>
nah, I only checked basic stuff on wiki and relevant things in
reference. Is there an article about ApplicationMAssLoader I missed?