<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: How to Load External Flash Video (FLV) Files (AS2)</title>
	<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Thu, 11 Mar 2010 16:57:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Henning</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436743</link>
		<pubDate>Mon, 25 Jan 2010 21:59:35 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436743</guid>
					<description>Hello again. Sorry, but I think I found the mistake... It is neither the Flashplayer nor the Coding. It seems to be the new CS4 Media Encoder which creates different FLV's. I remade them with the Flash CS3 Video Encoder and now it is working. I am not 100% sure, but I think this will solve the problem.</description>
		<content:encoded><![CDATA[<p>Hello again. Sorry, but I think I found the mistake&#8230; It is neither the Flashplayer nor the Coding. It seems to be the new CS4 Media Encoder which creates different FLV&#8217;s. I remade them with the Flash CS3 Video Encoder and now it is working. I am not 100% sure, but I think this will solve the problem.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Bart</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436699</link>
		<pubDate>Mon, 25 Jan 2010 17:32:23 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436699</guid>
					<description>Hey David,

Love your blog.  I had a question for you regarding loading an external FLV on my website.

My site is set up, loading external SWFs into an empty movie clip on the &quot;home&quot; flash file.  This home page has a series of buttons that call the external SWFs into the movie clip using this code:

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = &quot;main&quot;;
container.loadMovie(&quot;main.swf&quot;);
} else if (_root.currMovie != &quot;main&quot;) {
if (container._currentframe &amp;#62;= container.midframe) {
_root.currMovie = &quot;main&quot;;
container.play();
}
}
}

But, one of the buttons, I would like to call an external SWF into the movie clip that streams an FLV.  This &quot;movie&quot; external SWF uses the code from this article to stream the FLV which works fine, but when I click another button on the &quot;home&quot; page to unload that SWF and load another it doesn't work.

I can't figure out how to stop the NetStream, unload it and load the new SWF.

If you could help me, I'd really appreciate it.

Thanks a million.

Bart</description>
		<content:encoded><![CDATA[<p>Hey David,</p>
<p>Love your blog.  I had a question for you regarding loading an external FLV on my website.</p>
<p>My site is set up, loading external SWFs into an empty movie clip on the &#8220;home&#8221; flash file.  This home page has a series of buttons that call the external SWFs into the movie clip using this code:</p>
<p>on (release) {<br />
if (_root.currMovie == undefined) {<br />
_root.currMovie = &#8220;main&#8221;;<br />
container.loadMovie(&#8221;main.swf&#8221;);<br />
} else if (_root.currMovie != &#8220;main&#8221;) {<br />
if (container._currentframe &gt;= container.midframe) {<br />
_root.currMovie = &#8220;main&#8221;;<br />
container.play();<br />
}<br />
}<br />
}</p>
<p>But, one of the buttons, I would like to call an external SWF into the movie clip that streams an FLV.  This &#8220;movie&#8221; external SWF uses the code from this article to stream the FLV which works fine, but when I click another button on the &#8220;home&#8221; page to unload that SWF and load another it doesn&#8217;t work.</p>
<p>I can&#8217;t figure out how to stop the NetStream, unload it and load the new SWF.</p>
<p>If you could help me, I&#8217;d really appreciate it.</p>
<p>Thanks a million.</p>
<p>Bart
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Henning</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436683</link>
		<pubDate>Mon, 25 Jan 2010 15:21:16 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436683</guid>
					<description>Hello David.
First of all: Thanks a lot for this blog. I used this topic to do one of my MA projects last year and it worked out very well. But I had to update the application and something is not working properly any more. I just do not know, what it is…

I have a starting loop at the beginning (Framelabel &quot;Loop&quot;):

Script-Layer 1

stop(); // so that the whole comp stops here

Script-Layer 2

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
videoPlayer.attachVideo(ns);
ns.play(&quot;Content/00_Loop.flv&quot;);

ns.onStatus = function(evt:Object):Void {
  if (evt.code == &quot;NetStream.Play.Stop&quot;) {
    this.seek(0);
  }
};

With some buttons you can start a separate movie

on (release, keyPress &quot;p&quot;) {
	gotoAndPlay(&quot;Clip&quot;);
}

and there this one starts...

var duration:Number = 0;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
videoPlayer.attachVideo(ns);
ns.play(&quot;Content/01_Cycle.flv&quot;);

ns.onMetaData = function(evt:Object):Void {
  duration = evt.duration;
};
ns.onStatus = function(evt:Object):Void {
  if (this.time &amp;#62; 0 &amp;#38;&amp;#38; this.time &amp;#62;= duration) {
    gotoAndPlay(&quot;Loop&quot;);
	//trace(&quot;Video complete&quot;)
    delete this.onStatus;
  }
}

It was working like that very well, but since I have updated to CS4 and using the Flashplayer 10, the video doesn't go back to &quot;Loop&quot; but stops at the last frame of the Clip-Film.

Could it be Flashplayer 10?
Or is something wrong with my script?</description>
		<content:encoded><![CDATA[<p>Hello David.<br />
First of all: Thanks a lot for this blog. I used this topic to do one of my MA projects last year and it worked out very well. But I had to update the application and something is not working properly any more. I just do not know, what it is…</p>
<p>I have a starting loop at the beginning (Framelabel &#8220;Loop&#8221;):</p>
<p>Script-Layer 1</p>
<p>stop(); // so that the whole comp stops here</p>
<p>Script-Layer 2</p>
<p>var nc:NetConnection = new NetConnection();<br />
nc.connect(null);<br />
var ns:NetStream = new NetStream(nc);<br />
videoPlayer.attachVideo(ns);<br />
ns.play(&#8221;Content/00_Loop.flv&#8221;);</p>
<p>ns.onStatus = function(evt:Object):Void {<br />
  if (evt.code == &#8220;NetStream.Play.Stop&#8221;) {<br />
    this.seek(0);<br />
  }<br />
};</p>
<p>With some buttons you can start a separate movie</p>
<p>on (release, keyPress &#8220;p&#8221;) {<br />
	gotoAndPlay(&#8221;Clip&#8221;);<br />
}</p>
<p>and there this one starts&#8230;</p>
<p>var duration:Number = 0;<br />
var nc:NetConnection = new NetConnection();<br />
nc.connect(null);<br />
var ns:NetStream = new NetStream(nc);<br />
videoPlayer.attachVideo(ns);<br />
ns.play(&#8221;Content/01_Cycle.flv&#8221;);</p>
<p>ns.onMetaData = function(evt:Object):Void {<br />
  duration = evt.duration;<br />
};<br />
ns.onStatus = function(evt:Object):Void {<br />
  if (this.time &gt; 0 &amp;&amp; this.time &gt;= duration) {<br />
    gotoAndPlay(&#8221;Loop&#8221;);<br />
	//trace(&#8221;Video complete&#8221;)<br />
    delete this.onStatus;<br />
  }<br />
}</p>
<p>It was working like that very well, but since I have updated to CS4 and using the Flashplayer 10, the video doesn&#8217;t go back to &#8220;Loop&#8221; but stops at the last frame of the Clip-Film.</p>
<p>Could it be Flashplayer 10?<br />
Or is something wrong with my script?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: veronica</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436260</link>
		<pubDate>Fri, 22 Jan 2010 19:22:08 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-436260</guid>
					<description>Hi David.
I just want to say THANK YOU for your blog and helpful thread.
After spending all day trying to set up a video player that initially loads a random flv and then also allows you to play specific flv's using buttons, I finally stumbled upon this thread and you saved the day! It's working great.

Thanks again!
Veronica</description>
		<content:encoded><![CDATA[<p>Hi David.<br />
I just want to say THANK YOU for your blog and helpful thread.<br />
After spending all day trying to set up a video player that initially loads a random flv and then also allows you to play specific flv&#8217;s using buttons, I finally stumbled upon this thread and you saved the day! It&#8217;s working great.</p>
<p>Thanks again!<br />
Veronica
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Ron</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-422365</link>
		<pubDate>Tue, 27 Oct 2009 14:01:47 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-422365</guid>
					<description>Sorry. What i meant was...
I don't have any controls on it.
Is there a way to have it paused at the begining and then when clicked it plays?</description>
		<content:encoded><![CDATA[<p>Sorry. What i meant was&#8230;<br />
I don&#8217;t have any controls on it.<br />
Is there a way to have it paused at the begining and then when clicked it plays?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Ron</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-422361</link>
		<pubDate>Tue, 27 Oct 2009 13:48:39 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-422361</guid>
					<description>This is brilliant!
Is there anyway to have it paused at the start and then a simple play/pause button next to it?</description>
		<content:encoded><![CDATA[<p>This is brilliant!<br />
Is there anyway to have it paused at the start and then a simple play/pause button next to it?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: ANN</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-411611</link>
		<pubDate>Tue, 08 Sep 2009 14:11:28 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-411611</guid>
					<description>How would I incorporate the onComplete Function in to this code I already have. I have to use the code below:

stop(); // stop the page from playing
trace(&quot;This=&quot;+this)

// this makes sure that all_rise.flv can be found at run time and dev time

if (_parent) // only true if embedded in another SWF like pageFlip
{
	// live, wait till the unmute signal is sent
	FLV.contentPath=&quot;pages/all_rise2.flv&quot;;
	FLV.autoPlay=false;

}
else
{
	// during testing we want the video to start immediately
	FLV.contentPath=&quot;all_rise2.flv&quot;;
	Signal(&quot;unmute&quot;);
}

function Signal(msg:String)

{
	
switch(msg)

{

case &quot;mute&quot;: FLV.stop(); break;		// this signal can be issued several times.

case &quot;unmute&quot;: FLV.play(); break;	// this signal is sent once only.

}

}

Thanks</description>
		<content:encoded><![CDATA[<p>How would I incorporate the onComplete Function in to this code I already have. I have to use the code below:</p>
<p>stop(); // stop the page from playing<br />
trace(&#8221;This=&#8221;+this)</p>
<p>// this makes sure that all_rise.flv can be found at run time and dev time</p>
<p>if (_parent) // only true if embedded in another SWF like pageFlip<br />
{<br />
	// live, wait till the unmute signal is sent<br />
	FLV.contentPath=&#8221;pages/all_rise2.flv&#8221;;<br />
	FLV.autoPlay=false;</p>
<p>}<br />
else<br />
{<br />
	// during testing we want the video to start immediately<br />
	FLV.contentPath=&#8221;all_rise2.flv&#8221;;<br />
	Signal(&#8221;unmute&#8221;);<br />
}</p>
<p>function Signal(msg:String)</p>
<p>{</p>
<p>switch(msg)</p>
<p>{</p>
<p>case &#8220;mute&#8221;: FLV.stop(); break;		// this signal can be issued several times.</p>
<p>case &#8220;unmute&#8221;: FLV.play(); break;	// this signal is sent once only.</p>
<p>}</p>
<p>}</p>
<p>Thanks
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Kolyan</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-405377</link>
		<pubDate>Sat, 01 Aug 2009 19:52:07 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-405377</guid>
					<description>Hello fellows,

I am having some issues with one episode.
When movie compiles it loosening a connection with one FLV files (at root directory with the swf). It drops about 19 lines of code about &quot;Virtual PLayer&quot;.

It was actually very irritatingly in and out. Like if I'll hit &quot;Ctrl+Enter&quot; one after another then sometimes it compiles ok and video plays, but mostly don't. I killed &quot;mx&quot; folder, trying again - noway, video is not showing.
Any thoughts, please?

Kolyan</description>
		<content:encoded><![CDATA[<p>Hello fellows,</p>
<p>I am having some issues with one episode.<br />
When movie compiles it loosening a connection with one FLV files (at root directory with the swf). It drops about 19 lines of code about &#8220;Virtual PLayer&#8221;.</p>
<p>It was actually very irritatingly in and out. Like if I&#8217;ll hit &#8220;Ctrl+Enter&#8221; one after another then sometimes it compiles ok and video plays, but mostly don&#8217;t. I killed &#8220;mx&#8221; folder, trying again - noway, video is not showing.<br />
Any thoughts, please?</p>
<p>Kolyan
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Eric Denman</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-399917</link>
		<pubDate>Mon, 22 Jun 2009 16:41:06 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-399917</guid>
					<description>my biggest thing is that i can't use netstream and everything is setup around a the flvplayback component (because i am using actionscript cuepoints in AS2) and netstream doesn't support this.  My client now wants all files remotely loaded through .xml.   I have each video in loaded into an individual .swf and from the main wrapper, i just need make them accessible from .xml.</description>
		<content:encoded><![CDATA[<p>my biggest thing is that i can&#8217;t use netstream and everything is setup around a the flvplayback component (because i am using actionscript cuepoints in AS2) and netstream doesn&#8217;t support this.  My client now wants all files remotely loaded through .xml.   I have each video in loaded into an individual .swf and from the main wrapper, i just need make them accessible from .xml.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Eric Denman</title>
		<link>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-399916</link>
		<pubDate>Mon, 22 Jun 2009 16:37:25 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/how-to-load-external-video#comment-399916</guid>
					<description>This code, to load FLV's from XML works great, but it is on a button press.  I really need to have this work automatically (not on button press).  I have had no luck finding out how to do this one the web.  Any help would be great. 


// load the xml file
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load(”videos.xml”);

// parse the nodes of the xml into an array
function loadXML(){
vidArray = new Array();
aNode = this.firstChild.childNodes;
len = aNode.length;
for(var n=0;n!=len;n++){
vidArray[n] = aNode[n].attributes.url;
}
};

// buttons
video1_btn.onRelease = function(){
trace(vidArray[0]);
// videoObj_1 - instance name of FLVPlayback component
videoObj_1.contentPath = vidArray[0];
};

video2_btn.onRelease = function(){
trace(vidArray[1]);
videoObj_2.contentPath = vidArray[1];
};</description>
		<content:encoded><![CDATA[<p>This code, to load FLV&#8217;s from XML works great, but it is on a button press.  I really need to have this work automatically (not on button press).  I have had no luck finding out how to do this one the web.  Any help would be great. </p>
<p>// load the xml file<br />
xmlData = new XML();<br />
xmlData.ignoreWhite = true;<br />
xmlData.onLoad = loadXML;<br />
xmlData.load(”videos.xml”);</p>
<p>// parse the nodes of the xml into an array<br />
function loadXML(){<br />
vidArray = new Array();<br />
aNode = this.firstChild.childNodes;<br />
len = aNode.length;<br />
for(var n=0;n!=len;n++){<br />
vidArray[n] = aNode[n].attributes.url;<br />
}<br />
};</p>
<p>// buttons<br />
video1_btn.onRelease = function(){<br />
trace(vidArray[0]);<br />
// videoObj_1 - instance name of FLVPlayback component<br />
videoObj_1.contentPath = vidArray[0];<br />
};</p>
<p>video2_btn.onRelease = function(){<br />
trace(vidArray[1]);<br />
videoObj_2.contentPath = vidArray[1];<br />
};
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
