<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Strange Flash cache behaviour and attachMovieAnywhere solution</title>
	<atom:link href="http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/</link>
	<description>on Flash, Java, Webdesign</description>
	<lastBuildDate>Thu, 20 Aug 2009 18:15:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Madarco</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20851</link>
		<dc:creator>Madarco</dc:creator>
		<pubDate>Fri, 10 Oct 2008 09:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20851</guid>
		<description>It may depends of the kind of headers your web server is sending.
You should check the cache related ones.

Btw, there is a simple test in this page, it load a movieclip from a php page that log how many request the server receive. 
If it is green, then your client is asking for the movieclip only the first time, subsequent calls doesn&#039;t produce an http request.

However, looking at the statistics of the test, sometimes it seems to fail, but I haven&#039;t isolated the cause.</description>
		<content:encoded><![CDATA[<p>It may depends of the kind of headers your web server is sending.<br />
You should check the cache related ones.</p>
<p>Btw, there is a simple test in this page, it load a movieclip from a php page that log how many request the server receive.<br />
If it is green, then your client is asking for the movieclip only the first time, subsequent calls doesn&#8217;t produce an http request.</p>
<p>However, looking at the statistics of the test, sometimes it seems to fail, but I haven&#8217;t isolated the cause.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mite</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20850</link>
		<dc:creator>mite</dc:creator>
		<pubDate>Tue, 07 Oct 2008 19:55:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20850</guid>
		<description>Hi Madarco,


Try to use Charles debugger(google it), or even apple safari debugger and you`ll see the load calls.
I did a solution like yours some time ago to a project I was working, and it was very slow inside any browser(due the flash load a new file in every call).
After use shared library, it speed up 200%  and stop the &quot;HTTP1/1 304 Not Modified&quot;.
The only shared library problem, I think, it the need to import the externals swf reference.


I think flash 9/10 can attach others swf assets without need shared object or a solution like yours.

Best Regards,
Mite</description>
		<content:encoded><![CDATA[<p>Hi Madarco,</p>
<p>Try to use Charles debugger(google it), or even apple safari debugger and you`ll see the load calls.<br />
I did a solution like yours some time ago to a project I was working, and it was very slow inside any browser(due the flash load a new file in every call).<br />
After use shared library, it speed up 200%  and stop the &#8220;HTTP1/1 304 Not Modified&#8221;.<br />
The only shared library problem, I think, it the need to import the externals swf reference.</p>
<p>I think flash 9/10 can attach others swf assets without need shared object or a solution like yours.</p>
<p>Best Regards,<br />
Mite</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madarco</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20787</link>
		<dc:creator>Madarco</dc:creator>
		<pubDate>Thu, 14 Aug 2008 15:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20787</guid>
		<description>Are you sure?

Sniffing the traffic (http://www.wireshark.org/) I&#039;ve see only a request per item.

It will try to load an url only once, then it will take the cached item at every load attempt.
Like a browser: IE, Firefox, ecc, will load an image only the first time it occurs in a page.

Ps: I&#039;m referring to Flash 8, I don&#039;t know if Flash 9 is different.</description>
		<content:encoded><![CDATA[<p>Are you sure?</p>
<p>Sniffing the traffic (<a href="http://www.wireshark.org/" rel="nofollow">http://www.wireshark.org/</a>) I&#8217;ve see only a request per item.</p>
<p>It will try to load an url only once, then it will take the cached item at every load attempt.<br />
Like a browser: IE, Firefox, ecc, will load an image only the first time it occurs in a page.</p>
<p>Ps: I&#8217;m referring to Flash 8, I don&#8217;t know if Flash 9 is different.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mite</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20784</link>
		<dc:creator>mite</dc:creator>
		<pubDate>Thu, 07 Aug 2008 05:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20784</guid>
		<description>Hello,

&quot;Maybe because I have always thought that &quot;loadClip&quot; would have loaded file, maybe receiving a &quot;HTTP1/1 304 Not Modified&quot; reply, instead of silently take the cached one, who knows!
&quot;
Well, acually it do receives a &quot;HTTP1/1 304 Not Modified&quot; everytime a load call is attemp.
flash cannot &quot;silently take the cached one&quot;.


Aynway, Thanks.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>&#8220;Maybe because I have always thought that &#8220;loadClip&#8221; would have loaded file, maybe receiving a &#8220;HTTP1/1 304 Not Modified&#8221; reply, instead of silently take the cached one, who knows!<br />
&#8221;<br />
Well, acually it do receives a &#8220;HTTP1/1 304 Not Modified&#8221; everytime a load call is attemp.<br />
flash cannot &#8220;silently take the cached one&#8221;.</p>
<p>Aynway, Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madarco</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20509</link>
		<dc:creator>Madarco</dc:creator>
		<pubDate>Wed, 16 Jan 2008 19:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20509</guid>
		<description>Hi,
it is because attachMovieAnywhere load the movie from the net.
The first time container.attachMovieAnywhere(&#039;foo.swf&#039;, &#039;clip&#039;, &#039;foo&#039;); is executed it will load the clip from the server.
This can take some time.
The second time container.attachMovieAnywhere(&#039;foo.swf&#039;, &#039;clip&#039;, &#039;foo&#039;); is executed it will take the file &quot;foo.swf&quot; from the browser cache, so the load will take the minimum amount of time: 1 frame.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
it is because attachMovieAnywhere load the movie from the net.<br />
The first time container.attachMovieAnywhere(&#8216;foo.swf&#8217;, &#8216;clip&#8217;, &#8216;foo&#8217;); is executed it will load the clip from the server.<br />
This can take some time.<br />
The second time container.attachMovieAnywhere(&#8216;foo.swf&#8217;, &#8216;clip&#8217;, &#8216;foo&#8217;); is executed it will take the file &#8220;foo.swf&#8221; from the browser cache, so the load will take the minimum amount of time: 1 frame.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Riccardo Bartoli</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20508</link>
		<dc:creator>Riccardo Bartoli</dc:creator>
		<pubDate>Wed, 16 Jan 2008 17:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20508</guid>
		<description>Hi Madarco,
thank you for sharing this tip. I can&#039;t understand this:

The main difference from attachMovie is that the attached movieclip will not be avaible until the next frame.

With attachMovie the item it&#039;s attached and available in the frame where the code is scoped. 
How can a movieclip be available in the next frame if it&#039;s attached in the previous?

Thanks a lot</description>
		<content:encoded><![CDATA[<p>Hi Madarco,<br />
thank you for sharing this tip. I can&#8217;t understand this:</p>
<p>The main difference from attachMovie is that the attached movieclip will not be avaible until the next frame.</p>
<p>With attachMovie the item it&#8217;s attached and available in the frame where the code is scoped.<br />
How can a movieclip be available in the next frame if it&#8217;s attached in the previous?</p>
<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julio</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-20279</link>
		<dc:creator>Julio</dc:creator>
		<pubDate>Thu, 06 Dec 2007 10:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-20279</guid>
		<description>have you tried cache manager?

http://www.communitymx.com/content/article.cfm?page=2&amp;cid=827EA</description>
		<content:encoded><![CDATA[<p>have you tried cache manager?</p>
<p><a href="http://www.communitymx.com/content/article.cfm?page=2&amp;cid=827EA" rel="nofollow">http://www.communitymx.com/content/article.cfm?page=2&amp;cid=827EA</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pete</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-13736</link>
		<dc:creator>Pete</dc:creator>
		<pubDate>Wed, 19 Sep 2007 08:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-13736</guid>
		<description>Good stuff, thanks.</description>
		<content:encoded><![CDATA[<p>Good stuff, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarah</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-8997</link>
		<dc:creator>Sarah</dc:creator>
		<pubDate>Fri, 06 Jul 2007 14:55:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-8997</guid>
		<description>Thank you!  This post saved me a great deal of time trying to figure out how to cache massive movieclips.

Your solution, although very simple, surprised me.  I would have thought that if Flash cached files loaded by MovieClipLoader, then this code... (using the same MovieClipLoader &quot;mcLoader&quot; to load the same file onto the same target twice)....

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.loadClip(&quot;libraryfile.swf&quot;, target); 
mcLoader.loadClip(&quot;libraryfile.swf&quot;, target); 
 
... would have worked in a similar way to the code that you provided (which uses a second MovieClipLoader &quot;mcLoader2&quot; and a second target &quot;target2&quot;)... 

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.loadClip(&quot;libraryfile.swf&quot;, target); 
var mcLoader2:MovieClipLoader = new MovieClipLoader();
mcLoader2.loadClip(&quot;libraryfile.swf&quot;, target2); 

...but no!  Using the same MovieClipLoader OR the same target on the second load clears the cache.  I tested them all.  

Now that I know how this works I am very happy.  Thanks again for sharing.</description>
		<content:encoded><![CDATA[<p>Thank you!  This post saved me a great deal of time trying to figure out how to cache massive movieclips.</p>
<p>Your solution, although very simple, surprised me.  I would have thought that if Flash cached files loaded by MovieClipLoader, then this code&#8230; (using the same MovieClipLoader &#8220;mcLoader&#8221; to load the same file onto the same target twice)&#8230;.</p>
<p>var mcLoader:MovieClipLoader = new MovieClipLoader();<br />
mcLoader.loadClip(&#8220;libraryfile.swf&#8221;, target);<br />
mcLoader.loadClip(&#8220;libraryfile.swf&#8221;, target); </p>
<p>&#8230; would have worked in a similar way to the code that you provided (which uses a second MovieClipLoader &#8220;mcLoader2&#8243; and a second target &#8220;target2&#8243;)&#8230; </p>
<p>var mcLoader:MovieClipLoader = new MovieClipLoader();<br />
mcLoader.loadClip(&#8220;libraryfile.swf&#8221;, target);<br />
var mcLoader2:MovieClipLoader = new MovieClipLoader();<br />
mcLoader2.loadClip(&#8220;libraryfile.swf&#8221;, target2); </p>
<p>&#8230;but no!  Using the same MovieClipLoader OR the same target on the second load clears the cache.  I tested them all.  </p>
<p>Now that I know how this works I am very happy.  Thanks again for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MAB Blog &#187; Blog Archive &#187; AttachMovie &#38; Loaded Clips</title>
		<link>http://blog.madarco.net/26/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/comment-page-1/#comment-5574</link>
		<dc:creator>MAB Blog &#187; Blog Archive &#187; AttachMovie &#38; Loaded Clips</dc:creator>
		<pubDate>Mon, 30 Apr 2007 18:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.madarco.net/flash/strange-flash-cache-behaviour-and-attachmovieanywhere-solution/#comment-5574</guid>
		<description>[...] is extremely frusterating&#8230; but after some searching today I came across this interesting link. Using the fact that Flash likes to cache everything it can, he created a function that will load [...]</description>
		<content:encoded><![CDATA[<p>[...] is extremely frusterating&#8230; but after some searching today I came across this interesting link. Using the fact that Flash likes to cache everything it can, he created a function that will load [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
