<?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: Preloading .flv and .mp3 files with Flash</title>
	<atom:link href="http://www.askapache.com/flash/preloading-caching-flv-mp3.html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Wed, 18 Nov 2009 23:28:48 -0500</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Luke</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-78456</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Mon, 01 Jun 2009 22:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-78456</guid>
		<description>So how do I then access the flv?  The code looks like it&#039;s working right- Safari&#039;s activity monitor shows that my flv is loading- but then when I go to play the flv, the activity monitor shows that it&#039;s opening up another stream for the same file.</description>
		<content:encoded><![CDATA[<p>So how do I then access the flv?  The code looks like it&#8217;s working right- Safari&#8217;s activity monitor shows that my flv is loading- but then when I go to play the flv, the activity monitor shows that it&#8217;s opening up another stream for the same file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucho</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-77033</link>
		<dc:creator>Lucho</dc:creator>
		<pubDate>Thu, 28 May 2009 04:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-77033</guid>
		<description>How the heck do I turn off this awful music you have on this page?! Damn! are we back in the 90&#039;s?

BTW, thanks a lot for this post :P</description>
		<content:encoded><![CDATA[<p>How the heck do I turn off this awful music you have on this page?! Damn! are we back in the 90&#8217;s?</p>
<p>BTW, thanks a lot for this post :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leon Harris</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-73606</link>
		<dc:creator>Leon Harris</dc:creator>
		<pubDate>Wed, 13 May 2009 11:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-73606</guid>
		<description>Thanks for this. It came is very useful as I am putting together an virtual Art gallery site, which is using a couple dozen FLV files to simulate moving around a Art Gallery. I needed a way to &lt;em&gt;preload the videos&lt;/em&gt; before hand as they are all streamed for moving back and forward. I did a quick alteration to your code so that it would load multiple videos one after the other from an array.

&lt;pre&gt;video = new Array();
video[1]=&quot;intro1.flv&quot;;
video[2]=&quot;move1.flv&quot;;
video[3]=&quot;move2.flv&quot;;
video[4]=&quot;intro2.flv&quot;;
video[5]=&quot;move1a.flv&quot;;
video[6]=&quot;move2a.flv&quot;;
&#160;
if(i ==undefined){_global.i = 1;}
&#160;
file = &#039;clips_400kbps/&#039;+video[i];
 
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
//attach videodisplay
_level0.attachVideo(ns);
ns.setBufferTime(0);
//myVideo.attachVideo(ns);
ns.play(file);
ns.pause();
ns.seek(0);
&#160;
ns.onStatus = function(infoObject:Object) {
if(infoObject.code==&quot;NetStream.Buffer.Flush&quot;){
if(i &lt; video.length-1){
i++;
play();
}else{
trace(&quot;videos have all been preloaded&quot;);
stop();}}}&lt;/pre&gt;

I probably could refine this more but it did what I needed.

Cheers.</description>
		<content:encoded><![CDATA[<p>Thanks for this. It came is very useful as I am putting together an virtual Art gallery site, which is using a couple dozen FLV files to simulate moving around a Art Gallery. I needed a way to <em>preload the videos</em> before hand as they are all streamed for moving back and forward. I did a quick alteration to your code so that it would load multiple videos one after the other from an array.</p>
<pre>video = new Array();
video[1]="intro1.flv";
video[2]="move1.flv";
video[3]="move2.flv";
video[4]="intro2.flv";
video[5]="move1a.flv";
video[6]="move2a.flv";
&nbsp;
if(i ==undefined){_global.i = 1;}
&nbsp;
file = &#039;clips_400kbps/&#039;+video[i];

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
//attach videodisplay
_level0.attachVideo(ns);
ns.setBufferTime(0);
//myVideo.attachVideo(ns);
ns.play(file);
ns.pause();
ns.seek(0);
&nbsp;
ns.onStatus = function(infoObject:Object) {
if(infoObject.code=="NetStream.Buffer.Flush"){
if(i &lt; video.length-1){
i++;
play();
}else{
trace("videos have all been preloaded");
stop();}}}</pre>
<p>I probably could refine this more but it did what I needed.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-73072</link>
		<dc:creator>Marco</dc:creator>
		<pubDate>Sat, 09 May 2009 01:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-73072</guid>
		<description>You are the man. Thank you so much for sharing these tips; these is actual useful information from someone doing actual useful work in the real world. Great read.</description>
		<content:encoded><![CDATA[<p>You are the man. Thank you so much for sharing these tips; these is actual useful information from someone doing actual useful work in the real world. Great read.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-46258</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Thu, 23 Oct 2008 19:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-46258</guid>
		<description>Hi. i found your post very useful. but i have a question. what happens if the user select one .flv that has not been completed yet. i have one swf that plays the video using the FLVPlayback object, but when i use it incorporating the code you posted the video doesn´t play. any suggestions?</description>
		<content:encoded><![CDATA[<p>Hi. i found your post very useful. but i have a question. what happens if the user select one .flv that has not been completed yet. i have one swf that plays the video using the FLVPlayback object, but when i use it incorporating the code you posted the video doesn´t play. any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jessicca</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-42734</link>
		<dc:creator>Jessicca</dc:creator>
		<pubDate>Tue, 01 Jul 2008 12:23:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-42734</guid>
		<description>Hello,

I&#039;ve read your article on Preloading .flv files with Actionscript and have tried it out.  It didn&#039;t work with my situation.  I have a website intro with one video clip that should correspond to various text within my flash file.  The easiest way to do this was by embedding the file, but then the sound quality was very poor.  I then decided to go the progressive download route.  I want to preload the file at the beginning of my swf file and then actually start playing it 195 frames into my swf file.  Without being able to preload the file, my video is delayed the first time I visit the site but then catches up to where it should be by my third visit.  Can you give me any advice?

Thank you for your time,
Jessicca</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I&#8217;ve read your article on Preloading .flv files with Actionscript and have tried it out.  It didn&#8217;t work with my situation.  I have a website intro with one video clip that should correspond to various text within my flash file.  The easiest way to do this was by embedding the file, but then the sound quality was very poor.  I then decided to go the progressive download route.  I want to preload the file at the beginning of my swf file and then actually start playing it 195 frames into my swf file.  Without being able to preload the file, my video is delayed the first time I visit the site but then catches up to where it should be by my third visit.  Can you give me any advice?</p>
<p>Thank you for your time,<br />
Jessicca</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken Luallen</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-36131</link>
		<dc:creator>Ken Luallen</dc:creator>
		<pubDate>Sun, 17 Feb 2008 04:31:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-36131</guid>
		<description>So you&#039;ve covered flvs and mp3s... can you show us &lt;strong&gt;how to preload an xml&#039;s worth of jpgs / pngs&lt;/strong&gt;?  That would be magnificent!</description>
		<content:encoded><![CDATA[<p>So you&#8217;ve covered flvs and mp3s&#8230; can you show us <strong>how to preload an xml&#8217;s worth of jpgs / pngs</strong>?  That would be magnificent!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: janos erdelyi</title>
		<link>http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-35648</link>
		<dc:creator>janos erdelyi</dc:creator>
		<pubDate>Fri, 01 Feb 2008 20:30:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.askapache.com/flash/preloading-caching-flv-mp3.html#comment-35648</guid>
		<description>it would be a huge waste of bandwidth to *definitely* transfer many many bytes that will only *maybe* be accessed by a human if you were to scale this up to all sites taking this type of action.

however, for end-user experience it&#039;s great when clicking around.

what about a middle ground? download a certain sized byte-range as a buffer and then stream the rest out if they decide to watch/listen - that way they get an instant start, but fewer resources are used for things the end-user never clicked on.</description>
		<content:encoded><![CDATA[<p>it would be a huge waste of bandwidth to *definitely* transfer many many bytes that will only *maybe* be accessed by a human if you were to scale this up to all sites taking this type of action.</p>
<p>however, for end-user experience it&#8217;s great when clicking around.</p>
<p>what about a middle ground? download a certain sized byte-range as a buffer and then stream the rest out if they decide to watch/listen &#8211; that way they get an instant start, but fewer resources are used for things the end-user never clicked on.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
