Hi Michael,
I address the problem of testing cache-busting code in the IDE in my blog:
http://blog.neo-archaic.net/2006/08/02/nocache-for-javascript-and-flash.htm
Basically, what you need to do is check for System.capabilites.playerType
before adding the cache-buster to the url.
var loader:MovieClipLoader;
var viewLoader:MovieClip;
var url:String = "images/catalogue/collection/cat1.jpg";
if (System.capabilities.playerType == "PlugIn"
|| System.capabilities.playerType == "ActiveX"){
url+="?nocache="+new Date().getTime();
}
loader.loadClip (url, viewLoader);
This, of course, won't prevent the other problem you mentioned, large files
downloading multiple times, but it can be quite handy for often-updated
content.
Karina
> -----Original Message-----
> From: T. Michael Keesey [mailto:[EMAIL PROTECTED]
> Sent: 15 February 2007 03:56
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] onLoadComplete, but no onLoadInit
>
> On 2/14/07, John VanHorn <[EMAIL PROTECTED]> wrote:
> > this problem has been discussed before. is this what youre
> referring to?
> >
> >
> http://chattyfig.figleaf.com/pipermail/flashcoders/2006-August/171681.
> > html
> >
> > seems that MovieClipLoader events do not fire correctly
> when content
> > is loaded from cache. if this is your problem, would appended a
> > cache-killing query string to the url work? something like:
> >
> > mcl.loadclip("someswf.swf?d=" + new Date().valueOf(),
> > targetMc
> > );
>
> Apparently this is a problem, as well as onLoadInit not
> working correctly all the time when publishing using the
> Flash 9 alpha. (And in that case, it fails sporadically in
> Firefox and the IDE as well.)
>
> Cache-busting is not a great solution, since 1) it makes it
> impossible to test anything anywhere except from a server,
> and 2) it could cause some large-ish files to download
> multiple times. I think I'll just have to come up with a
> customized solution and, in general, learn not to rely on onLoadInit.
>
> Suck.
> --
> Mike Keesey
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com