

































<?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 Build a Flash Video (FLV) Progress Bar (Part 2)</title>
	<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Wed, 08 Feb 2012 15:23:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: tishuggah</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-452863</link>
		<pubDate>Wed, 28 Apr 2010 13:49:21 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-452863</guid>
					<description>Hello EveryOne- I come 2 years after the last post. I hope some one will hear me !!
So here's my problem the same as Keith but different ... I have made a plyer with this code in a MovieClip, this code is in frame 2. In an other MovieClip, we can choose to watch other video. When you choose one, the player go to an play frame1, son when it arrive at the frame 2 , with your code the new vido can ba played.
The vide plays !!! YEAAAAAAAAAHHHH! The progress bar and the downlad bar act has it should, !!! YEAAAAAAAAAHHHH again! But when you want to drag de knob or click on the progress bar... every thing go wrong... The video stops, or it only seek the next cue point, or the progress bar doesn't work any more.
I' ve seen that you said tha tit was due to the NetStream.onMetaData. but does avery one know how to solve this? Even if as2 is obselte in front of as3...

Thank any way for this great code !!!</description>
		<content:encoded><![CDATA[<p>Hello EveryOne- I come 2 years after the last post. I hope some one will hear me !!<br />
So here&#8217;s my problem the same as Keith but different &#8230; I have made a plyer with this code in a MovieClip, this code is in frame 2. In an other MovieClip, we can choose to watch other video. When you choose one, the player go to an play frame1, son when it arrive at the frame 2 , with your code the new vido can ba played.<br />
The vide plays !!! YEAAAAAAAAAHHHH! The progress bar and the downlad bar act has it should, !!! YEAAAAAAAAAHHHH again! But when you want to drag de knob or click on the progress bar&#8230; every thing go wrong&#8230; The video stops, or it only seek the next cue point, or the progress bar doesn&#8217;t work any more.<br />
I&#8217; ve seen that you said tha tit was due to the NetStream.onMetaData. but does avery one know how to solve this? Even if as2 is obselte in front of as3&#8230;</p>
<p>Thank any way for this great code !!!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-157764</link>
		<pubDate>Sat, 05 Apr 2008 01:03:49 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-157764</guid>
					<description>jdq,

&lt;blockquote&gt;So you are saying SEEK is accurate to thousand’s of a second (to the extent that the keyframes are there)??&lt;/blockquote&gt;

Yes, to the extent that a keyframe is present, you have approximately millisecond accuracy.  Keep in mind that most video is encoded at NTSC and PAL framerates or slower &amp;#8212; which aren't anywhere near 1,000fps (not by a long shot!) ... but at least you can &lt;em&gt;specify&lt;/em&gt; a seek to the nearest millisecond.  Might be very hard to demonstrate practically, though.

A hint in support of my assertion is that the &lt;code&gt;NetStream.seek()&lt;/code&gt; method in AS3 accepts a &lt;code&gt;Number&lt;/code&gt; datatype (floating point) rather than, say, &lt;code&gt;int&lt;/code&gt; (integer).  If that sort of accuracy is really important, though, your best bet is very like a streaming server, which allows you to seek to any video frame (not just keyframes).</description>
		<content:encoded><![CDATA[<p>jdq,</p>
<blockquote><p>So you are saying SEEK is accurate to thousand’s of a second (to the extent that the keyframes are there)??</p></blockquote>
<p>Yes, to the extent that a keyframe is present, you have approximately millisecond accuracy.  Keep in mind that most video is encoded at NTSC and PAL framerates or slower &mdash; which aren&#8217;t anywhere near 1,000fps (not by a long shot!) &#8230; but at least you can <em>specify</em> a seek to the nearest millisecond.  Might be very hard to demonstrate practically, though.</p>
<p>A hint in support of my assertion is that the <code>NetStream.seek()</code> method in AS3 accepts a <code>Number</code> datatype (floating point) rather than, say, <code>int</code> (integer).  If that sort of accuracy is really important, though, your best bet is very like a streaming server, which allows you to seek to any video frame (not just keyframes).
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: jdq</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-157713</link>
		<pubDate>Fri, 04 Apr 2008 22:17:49 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-157713</guid>
					<description>dave, you told &quot;okeedoodle&quot;

&quot;For progressive download, the video seek to the first keyframe encountered after the specified time (use up to three decimal places to indicate times less than a second).&quot;

So you are saying SEEK is accurate to thousand's of a second (to the extent that the keyframes are there)??

As Okeedoodle says &quot;But everything I’ve found so far controls flv videos by seconds rather than milliseconds&quot; -- this is the impression I got too (when talking about progressive downloads). If it's true that seek can be used to something like frame accuracy, as opposed to whole second accuracy, that will be great! I hope you are right!</description>
		<content:encoded><![CDATA[<p>dave, you told &#8220;okeedoodle&#8221;</p>
<p>&#8220;For progressive download, the video seek to the first keyframe encountered after the specified time (use up to three decimal places to indicate times less than a second).&#8221;</p>
<p>So you are saying SEEK is accurate to thousand&#8217;s of a second (to the extent that the keyframes are there)??</p>
<p>As Okeedoodle says &#8220;But everything I’ve found so far controls flv videos by seconds rather than milliseconds&#8221; &#8212; this is the impression I got too (when talking about progressive downloads). If it&#8217;s true that seek can be used to something like frame accuracy, as opposed to whole second accuracy, that will be great! I hope you are right!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-157290</link>
		<pubDate>Fri, 04 Apr 2008 03:59:26 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-157290</guid>
					<description>Alex,

The &lt;code&gt;onMetaData&lt;/code&gt; event requires Flash Player 7 or higher &amp;#8212; could that be it?</description>
		<content:encoded><![CDATA[<p>Alex,</p>
<p>The <code>onMetaData</code> event requires Flash Player 7 or higher &mdash; could that be it?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Alex</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-137703</link>
		<pubDate>Thu, 21 Feb 2008 07:43:37 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-137703</guid>
					<description>WONDERFUL blog...I'm having to do more and more flash at work and you have had a big part of me continuing to be employed!  ha!  I have a problem with the code above though.  I'm following your instructions precisely but when I try to run it it gives me the following error:

**Error** Scene=Scene 1, layer=actions, frame=1:Line 11: There is no property with the name 'onMetaData'.
     ns.onMetaData = function(evt:Object):Void {

any ideas?  Thanks so much</description>
		<content:encoded><![CDATA[<p>WONDERFUL blog&#8230;I&#8217;m having to do more and more flash at work and you have had a big part of me continuing to be employed!  ha!  I have a problem with the code above though.  I&#8217;m following your instructions precisely but when I try to run it it gives me the following error:</p>
<p>**Error** Scene=Scene 1, layer=actions, frame=1:Line 11: There is no property with the name &#8216;onMetaData&#8217;.<br />
     ns.onMetaData = function(evt:Object):Void {</p>
<p>any ideas?  Thanks so much
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-127236</link>
		<pubDate>Sat, 02 Feb 2008 01:17:05 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-127236</guid>
					<description>okeenoodle,

There are two ways to go.  If you're streaming your video via &lt;a href=&quot;http://www.adobe.com/products/flashmediaserver/&quot; target=&quot;_blank&quot;&gt;Flash Media Server&lt;/a&gt;, &lt;a href=&quot;http://osflash.org/red5&quot; target=&quot;_blank&quot;&gt;Red5&lt;/a&gt;, or the like, you can seek to any video frame, which may or may not fall on a given millisecond (depends entirely on the framerate of the movie, and I've never seen a 1000fps video framerate &amp;#8212; not even sure that's possible).  If you're progressively downloading, as shown in the code sample in the article, then you can only seek to video &lt;em&gt;keyframes&lt;/em&gt;, and not only that, but keyframes that have already been loaded.  You can still get millisecond-specific, but the chances would be even worse that a video keyframe would fall exactly along a given millisecond.  For progressive download, the video seek to the first keyframe encountered after the specified time (use up to three decimal places to indicate times less than a second).</description>
		<content:encoded><![CDATA[<p>okeenoodle,</p>
<p>There are two ways to go.  If you&#8217;re streaming your video via <a href="http://www.adobe.com/products/flashmediaserver/" target="_blank">Flash Media Server</a>, <a href="http://osflash.org/red5" target="_blank">Red5</a>, or the like, you can seek to any video frame, which may or may not fall on a given millisecond (depends entirely on the framerate of the movie, and I&#8217;ve never seen a 1000fps video framerate &mdash; not even sure that&#8217;s possible).  If you&#8217;re progressively downloading, as shown in the code sample in the article, then you can only seek to video <em>keyframes</em>, and not only that, but keyframes that have already been loaded.  You can still get millisecond-specific, but the chances would be even worse that a video keyframe would fall exactly along a given millisecond.  For progressive download, the video seek to the first keyframe encountered after the specified time (use up to three decimal places to indicate times less than a second).
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: okeenoodle</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-127151</link>
		<pubDate>Fri, 01 Feb 2008 19:11:34 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-127151</guid>
					<description>When working with flv files, is there a way to get a millisecond duration &amp;#38; position, similar to working with audio files (mySound.duration and mySound.position return milliseconds).  I'm looking to control play/pause/seek functions within 10-20 millisecond window in order to accurately and dynamically attach sound objects to a flv. But everything I've found so far controls flv videos by seconds rather than milliseconds.</description>
		<content:encoded><![CDATA[<p>When working with flv files, is there a way to get a millisecond duration &amp; position, similar to working with audio files (mySound.duration and mySound.position return milliseconds).  I&#8217;m looking to control play/pause/seek functions within 10-20 millisecond window in order to accurately and dynamically attach sound objects to a flv. But everything I&#8217;ve found so far controls flv videos by seconds rather than milliseconds.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: HeavyPops</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-126334</link>
		<pubDate>Thu, 31 Jan 2008 03:22:29 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-126334</guid>
					<description>Thanx!</description>
		<content:encoded><![CDATA[<p>Thanx!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-126322</link>
		<pubDate>Thu, 31 Jan 2008 02:51:55 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-126322</guid>
					<description>HeavyPops,

Honestly, I haven't dipped into those FLVPlayback-related source files much.  FLVPlayback is a bit different from the other components, but they're all pretty complex beasts.  The code you're after isn't going to be in the FLAs, though.  It's going to be in ActionScript files (class files).  In my Win XP machine, those files are located ...

C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\
Classes\mx\video\

It really might be easier to start from scratch!  ;)

&lt;blockquote&gt;I tried:

played._x = knob._x;

…”played” is a movie clip that darkens the seek bar with the registration point of on the right. It places the “played” clip where the knob starts but doesn’t follow it as it moves.&lt;/blockquote&gt;

In order for the &lt;code&gt;played&lt;/code&gt; movie clip to follow the &lt;code&gt;knob&lt;/code&gt; movie clip, you'll have to repeatedly update &lt;code&gt;played&lt;/code&gt;'s position.  The single line of code you showed will set those &lt;code&gt;_x&lt;/code&gt; properties to the same value at that moment.  To repeat the process, you'll have to put that line inside the loop that continuously moves &lt;code&gt;knob&lt;/code&gt; (in the blog article that happens inside a &lt;code&gt;setInterval()&lt;/code&gt; loop).</description>
		<content:encoded><![CDATA[<p>HeavyPops,</p>
<p>Honestly, I haven&#8217;t dipped into those FLVPlayback-related source files much.  FLVPlayback is a bit different from the other components, but they&#8217;re all pretty complex beasts.  The code you&#8217;re after isn&#8217;t going to be in the FLAs, though.  It&#8217;s going to be in ActionScript files (class files).  In my Win XP machine, those files are located &#8230;</p>
<p>C:\Program Files\Adobe\Adobe Flash CS3\en\First Run\<br />
Classes\mx\video\</p>
<p>It really might be easier to start from scratch!  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<blockquote><p>I tried:</p>
<p>played._x = knob._x;</p>
<p>…”played” is a movie clip that darkens the seek bar with the registration point of on the right. It places the “played” clip where the knob starts but doesn’t follow it as it moves.</p></blockquote>
<p>In order for the <code>played</code> movie clip to follow the <code>knob</code> movie clip, you&#8217;ll have to repeatedly update <code>played</code>&#8217;s position.  The single line of code you showed will set those <code>_x</code> properties to the same value at that moment.  To repeat the process, you&#8217;ll have to put that line inside the loop that continuously moves <code>knob</code> (in the blog article that happens inside a <code>setInterval()</code> loop).
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: HeavyPops</title>
		<link>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-126210</link>
		<pubDate>Wed, 30 Jan 2008 22:46:48 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/actionscript-20/how-to-build-flv-progress-bar-part2#comment-126210</guid>
					<description>David
This is related to the question for the handle in the SeekBar component;
Do You know where those on mouse event handlers are located for the seeBarHandle_mc. I've searched through the flash files and can't find it, maybe an additional function can be added there. ???

Another thing I've been toying with ( in my pursuit of creating a video player like YouTube ) is in the seek bar where the left side of the scrub handle is lighter than the right side.
I tried:

played._x = knob._x;

...&quot;played&quot; is a movie clip that darkens the seek bar with the registration point of on the right. It places the &quot;played&quot; clip where the knob starts but doesn't follow it as it moves.</description>
		<content:encoded><![CDATA[<p>David<br />
This is related to the question for the handle in the SeekBar component;<br />
Do You know where those on mouse event handlers are located for the seeBarHandle_mc. I&#8217;ve searched through the flash files and can&#8217;t find it, maybe an additional function can be added there. ???</p>
<p>Another thing I&#8217;ve been toying with ( in my pursuit of creating a video player like YouTube ) is in the seek bar where the left side of the scrub handle is lighter than the right side.<br />
I tried:</p>
<p>played._x = knob._x;</p>
<p>&#8230;&#8221;played&#8221; is a movie clip that darkens the seek bar with the registration point of on the right. It places the &#8220;played&#8221; clip where the knob starts but doesn&#8217;t follow it as it moves.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

