

<?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: Be in Charge of Browser Cacheing!</title>
	<atom:link href="http://www.quip.net/blog/2006/flash/be-in-charge-cacheing/feed" rel="self" type="application/rss+xml" />
	<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing</link>
	<description>Luck is the residue of good design.</description>
	<lastBuildDate>Tue, 20 Mar 2012 15:33:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: mike at sky</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-490285</link>
		<dc:creator>mike at sky</dc:creator>
		<pubDate>Wed, 03 Nov 2010 19:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-490285</guid>
		<description>I use flash page flip free version, so no source files....
I have an HTML file with an SWF in it. That SWF loads an XML file that lists the &#039;pages&#039; (in JPG or SWF format) to use. I only have access to the HTML file, the XML file and I can make new/change the &#039;pages&#039; - BUT when i edit the XML file (or a &#039;page&#039; file) and overwrite the original, nothing changes unless i view the individual XML or page file in the browser and hit refresh. 

Now, i found an actionscript to force a load of the XML file, but I can&#039;t put it where it belongs, I don&#039;t have access to modify that FLA/SWF. Can i force the HTML to load the XML file before the SWF file, and when said SWF tries to load it, it will use the one just uploaded by the HTML?

Everything is new to me, I&#039;m a graphics guy but this type of stuff gets dropped in my lap. I only know my jargon.</description>
		<content:encoded><![CDATA[<p>I use flash page flip free version, so no source files&#8230;.<br />
I have an HTML file with an SWF in it. That SWF loads an XML file that lists the &#8216;pages&#8217; (in JPG or SWF format) to use. I only have access to the HTML file, the XML file and I can make new/change the &#8216;pages&#8217; &#8211; BUT when i edit the XML file (or a &#8216;page&#8217; file) and overwrite the original, nothing changes unless i view the individual XML or page file in the browser and hit refresh. </p>
<p>Now, i found an actionscript to force a load of the XML file, but I can&#8217;t put it where it belongs, I don&#8217;t have access to modify that FLA/SWF. Can i force the HTML to load the XML file before the SWF file, and when said SWF tries to load it, it will use the one just uploaded by the HTML?</p>
<p>Everything is new to me, I&#8217;m a graphics guy but this type of stuff gets dropped in my lap. I only know my jargon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-111555</link>
		<dc:creator>David Stiller</dc:creator>
		<pubDate>Thu, 13 Dec 2007 18:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-111555</guid>
		<description>Jdaze,

Yes, you could certainly put your random number into the HTML, but then you&#039;d have to use JavaScript to produce that random number, which means you&#039;d also have to use JavaScript to write out that part of the HTML.  You could use the JavaScript &lt;code&gt;document.write()&lt;/code&gt; method or DOM scripting to do that, or &#8212; since it&#039;s a good idea to use something like &lt;a href=&quot;http://blog.deconcept.com/swfobject/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;SWFObject&lt;/a&gt; anyway &#8212; just use your JS-based Active Content workaround of choice to introduce the random number at that point (see my reply to Jeremy and Rich on &lt;a href=&quot;#comment-31739&quot;&gt;April 2, 2007&lt;/a&gt;).</description>
		<content:encoded><![CDATA[<p>Jdaze,</p>
<p>Yes, you could certainly put your random number into the HTML, but then you&#8217;d have to use JavaScript to produce that random number, which means you&#8217;d also have to use JavaScript to write out that part of the HTML.  You could use the JavaScript <code>document.write()</code> method or DOM scripting to do that, or &mdash; since it&#8217;s a good idea to use something like <a href="http://blog.deconcept.com/swfobject/" target="_blank" rel="nofollow">SWFObject</a> anyway &mdash; just use your JS-based Active Content workaround of choice to introduce the random number at that point (see my reply to Jeremy and Rich on <a href="#comment-31739">April 2, 2007</a>).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jdaze</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-111507</link>
		<dc:creator>Jdaze</dc:creator>
		<pubDate>Thu, 13 Dec 2007 15:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-111507</guid>
		<description>like so? Maybe the coding will show up this time...I hope

( param name=&quot;movie&quot; value=&quot;yourMovieHere.swf?rand=[random number]&quot; )
( embed src=&quot;yourMovieHere.swf?rand=[random number]&quot; )</description>
		<content:encoded><![CDATA[<p>like so? Maybe the coding will show up this time&#8230;I hope</p>
<p>( param name=&#8221;movie&#8221; value=&#8221;yourMovieHere.swf?rand=[random number]&#8221; )<br />
( embed src=&#8221;yourMovieHere.swf?rand=[random number]&#8221; )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jdaze</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-111506</link>
		<dc:creator>Jdaze</dc:creator>
		<pubDate>Thu, 13 Dec 2007 15:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-111506</guid>
		<description>Is it possible to have a random number generated here instead?


</description>
		<content:encoded><![CDATA[<p>Is it possible to have a random number generated here instead?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-91802</link>
		<dc:creator>David Stiller</dc:creator>
		<pubDate>Thu, 18 Oct 2007 13:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-91802</guid>
		<description>Will,

That isn&#039;t something I&#039;ve definitively tried to nail down.  Thinking back over my own experiences &#8212; happenstance, where I would partially download a video and recompile, because I was testing something else &#8212; I, too, would say I&#039;ve had inconsistent results.  In my own endeavors, the default buffer time is usually adequate; the minor pause before the video starts has been fine.

If you goal is to avoid the pause, I believe your best bet is true streaming, by way of Flash Media Server, Red5, and the like.

Wish I had a handy answer for you!  :)</description>
		<content:encoded><![CDATA[<p>Will,</p>
<p>That isn&#8217;t something I&#8217;ve definitively tried to nail down.  Thinking back over my own experiences &mdash; happenstance, where I would partially download a video and recompile, because I was testing something else &mdash; I, too, would say I&#8217;ve had inconsistent results.  In my own endeavors, the default buffer time is usually adequate; the minor pause before the video starts has been fine.</p>
<p>If you goal is to avoid the pause, I believe your best bet is true streaming, by way of Flash Media Server, Red5, and the like.</p>
<p>Wish I had a handy answer for you!  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Streeter</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-91737</link>
		<dc:creator>Will Streeter</dc:creator>
		<pubDate>Thu, 18 Oct 2007 04:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-91737</guid>
		<description>Is it possible to cache a part of an flv. Thus, I wanted to precache 10% of an flv so that when I actually begin to play an FLV it will automatically load in 10 % of the flv from the browser.  

I have been trying with inconsitent results... 

any ideas?</description>
		<content:encoded><![CDATA[<p>Is it possible to cache a part of an flv. Thus, I wanted to precache 10% of an flv so that when I actually begin to play an FLV it will automatically load in 10 % of the flv from the browser.  </p>
<p>I have been trying with inconsitent results&#8230; </p>
<p>any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-81046</link>
		<dc:creator>David Stiller</dc:creator>
		<pubDate>Thu, 13 Sep 2007 12:45:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-81046</guid>
		<description>JBlaze,

A compiler directive would be really nice for something like this, but the API provides a quick way to determine what mode you&#039;re in.  See the &lt;code&gt;System.capabilities&lt;/code&gt; class, which has a static &lt;code&gt;playerType&lt;/code&gt; property.  An &lt;code&gt;if&lt;/code&gt; statement is all you need:

&lt;pre&gt;&lt;code&gt;if (System.capabilities.playerType == &quot;External&quot;) {
  // this is the value for test movie mode
} else {
  // not in the IDE, so use cacheing workaround
}&lt;/code&gt;&lt;/pre&gt;

Of course, that doesn&#039;t provide a way to cause the hack to work locally, but it sounds like you&#039;re just looking for a way to turn it on or off depending on the circumstances.  (The funny thing is, I haven&#039;t noticed the technique to fail locally, but I don&#039;t currently run a server on my local machines.)</description>
		<content:encoded><![CDATA[<p>JBlaze,</p>
<p>A compiler directive would be really nice for something like this, but the API provides a quick way to determine what mode you&#8217;re in.  See the <code>System.capabilities</code> class, which has a static <code>playerType</code> property.  An <code>if</code> statement is all you need:</p>
<pre><code>if (System.capabilities.playerType == "External") {
  // this is the value for test movie mode
} else {
  // not in the IDE, so use cacheing workaround
}</code></pre>
<p>Of course, that doesn&#8217;t provide a way to cause the hack to work locally, but it sounds like you&#8217;re just looking for a way to turn it on or off depending on the circumstances.  (The funny thing is, I haven&#8217;t noticed the technique to fail locally, but I don&#8217;t currently run a server on my local machines.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JBlaze</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-80966</link>
		<dc:creator>JBlaze</dc:creator>
		<pubDate>Thu, 13 Sep 2007 05:16:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-80966</guid>
		<description>The problem with this method as others have stated, is it doesn&#039;t work when using it on your local devbox.  As far as I can tell, in AS you can&#039;t have any kind of compiler directive to switch off this when running locally.  Any suggestions on managing running locally vs. running on the web?</description>
		<content:encoded><![CDATA[<p>The problem with this method as others have stated, is it doesn&#8217;t work when using it on your local devbox.  As far as I can tell, in AS you can&#8217;t have any kind of compiler directive to switch off this when running locally.  Any suggestions on managing running locally vs. running on the web?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-76646</link>
		<dc:creator>David Stiller</dc:creator>
		<pubDate>Wed, 29 Aug 2007 11:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-76646</guid>
		<description>Shawn,

I think you&#039;re asking how to keep ActionScript (.as) files from cacheing, but that&#039;s not what AS files do &#8212; in fact, they shouldn&#039;t be on the server at all.  The &lt;code&gt;#include&lt;/code&gt; directive in ActionScript is significantly different from the concept of includes in PHP or ASP.  In the latter, include files percolate to the pages that call them as soon as they&#039;re uploaded.  In ActionScript, code is compiled, or &quot;baked,&quot; into the SWF at compile time, at which point it becomes immutable.

I&#039;ve seen many developers update the contents of an AS file, then upload that AS file to the server, hoping the SWF will look to the update and behave differently, but &lt;code&gt;#include&lt;/code&gt; &lt;em&gt;only&lt;/em&gt; works at compile time.  It literally copies/pastes the AS file&#039;s content into the FLA as if you had typed it there by hand ... only as the SWF is generated.  If you want to pull in data at runtime, you&#039;ll have to read the contents of a text file that stores name/value pairs in the same format as a query string, or read the contents of an XML file, or hit a database, etc.

Does that make sense?</description>
		<content:encoded><![CDATA[<p>Shawn,</p>
<p>I think you&#8217;re asking how to keep ActionScript (.as) files from cacheing, but that&#8217;s not what AS files do &mdash; in fact, they shouldn&#8217;t be on the server at all.  The <code>#include</code> directive in ActionScript is significantly different from the concept of includes in PHP or ASP.  In the latter, include files percolate to the pages that call them as soon as they&#8217;re uploaded.  In ActionScript, code is compiled, or &#8220;baked,&#8221; into the SWF at compile time, at which point it becomes immutable.</p>
<p>I&#8217;ve seen many developers update the contents of an AS file, then upload that AS file to the server, hoping the SWF will look to the update and behave differently, but <code>#include</code> <em>only</em> works at compile time.  It literally copies/pastes the AS file&#8217;s content into the FLA as if you had typed it there by hand &#8230; only as the SWF is generated.  If you want to pull in data at runtime, you&#8217;ll have to read the contents of a text file that stores name/value pairs in the same format as a query string, or read the contents of an XML file, or hit a database, etc.</p>
<p>Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn Wilson</title>
		<link>http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-76489</link>
		<dc:creator>Shawn Wilson</dc:creator>
		<pubDate>Wed, 29 Aug 2007 00:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.quip.net/blog/2006/flash/be-in-charge-cacheing#comment-76489</guid>
		<description>Any idea how to be in charge of caching included &#039;.as&#039; files?  I&#039;m developing a file now, have cache set to 0Kb.  The query string trick won&#039;t work (malformed include error).  My movie has 2 text blocks named &#039;foo&#039; and &#039;bar&#039;.

My code in frame 1 (of 1) is:

&gt; #include &quot;test.as&quot;
&gt; bar.text = &#039;working&#039;;

test.as code is:

&gt; foo.text = &#039;bar&#039;; 

I run the movie and get &#039;bar&#039; and &#039;working&#039;.  Great.  I change test.as to:

&gt; foo.text = &#039;bar2&#039;; 

and I still get &#039;bar&#039; and &#039;working&#039;.  No amount of cache clearing or restarting will clear it up.

I think it&#039;d make a great blog post if you can solve it.  The Google, she does nothing.

--Shawn</description>
		<content:encoded><![CDATA[<p>Any idea how to be in charge of caching included &#8216;.as&#8217; files?  I&#8217;m developing a file now, have cache set to 0Kb.  The query string trick won&#8217;t work (malformed include error).  My movie has 2 text blocks named &#8216;foo&#8217; and &#8216;bar&#8217;.</p>
<p>My code in frame 1 (of 1) is:</p>
<p>&gt; #include &#8220;test.as&#8221;<br />
&gt; bar.text = &#8216;working&#8217;;</p>
<p>test.as code is:</p>
<p>&gt; foo.text = &#8216;bar&#8217;; </p>
<p>I run the movie and get &#8216;bar&#8217; and &#8216;working&#8217;.  Great.  I change test.as to:</p>
<p>&gt; foo.text = &#8216;bar2&#8242;; </p>
<p>and I still get &#8216;bar&#8217; and &#8216;working&#8217;.  No amount of cache clearing or restarting will clear it up.</p>
<p>I think it&#8217;d make a great blog post if you can solve it.  The Google, she does nothing.</p>
<p>&#8211;Shawn</p>
]]></content:encoded>
	</item>
</channel>
</rss>

