<?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: Scrubbing an FLV using the VideoDisplay control and a slider</title>
	<atom:link href="http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Fri, 19 Mar 2010 20:35:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Oxnigarth</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-202</link>
		<dc:creator>Oxnigarth</dc:creator>
		<pubDate>Wed, 15 Apr 2009 20:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-202</guid>
		<description>Hey petered this is a real nice example.
I figured Out how to make the slider show the correct time (min, sec) when forwarding or rewinding the videos.

Here is what you need to do.

Create a function to handle the conversion.


private function timeConversion(item:Object):String{
	var pT:Number = item.valueOf() &#124;&#124; 0.1;
	var pTimeMS:Date = new Date(pT * 1000);

	return formatTime(pTimeMS);

}

add the following line to your HSlider component.
dataTipFormatFunction=&quot;timeConversion&quot;


Hope it Helps.</description>
		<content:encoded><![CDATA[<p>Hey petered this is a real nice example.<br />
I figured Out how to make the slider show the correct time (min, sec) when forwarding or rewinding the videos.</p>
<p>Here is what you need to do.</p>
<p>Create a function to handle the conversion.</p>
<p>private function timeConversion(item:Object):String{<br />
	var pT:Number = item.valueOf() || 0.1;<br />
	var pTimeMS:Date = new Date(pT * 1000);</p>
<p>	return formatTime(pTimeMS);</p>
<p>}</p>
<p>add the following line to your HSlider component.<br />
dataTipFormatFunction=&#8221;timeConversion&#8221;</p>
<p>Hope it Helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-203</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Mon, 24 Nov 2008 16:16:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-203</guid>
		<description>Nice example.  I would like to make the slider move more smoothly as the video plays.  Messing with the playheadUpdateInterval never gets it right.  Does anyone know of any tricks people have done to make the scrollbar smoother?</description>
		<content:encoded><![CDATA[<p>Nice example.  I would like to make the slider move more smoothly as the video plays.  Messing with the playheadUpdateInterval never gets it right.  Does anyone know of any tricks people have done to make the scrollbar smoother?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirav Mehta</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-204</link>
		<dc:creator>Nirav Mehta</dc:creator>
		<pubDate>Sat, 18 Oct 2008 08:35:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-204</guid>
		<description>Hi Peter,

Thanks for the examples. Just playing around with it..

The video time display is incorrect though. Since Flex creates new dates in the local time zone, if your timezone is not GMT, you will get incorrect time display. (It shows 30:01 for me instead of 00:01 since I am in GMT+530).

Here&#039;s a fix for that:

In the &lt;code&gt;videoDisplay_playheadUpdate()&lt;/code&gt; function:
&lt;pre class=&quot;code&quot;&gt;
var tzOffset:Date = new Date();
// This takes it one day in future minus the time zone offset
var tzDiff:Number = (86400 - tzOffset.getTimezoneOffset()*60) *1000;
var pTimeMS:Date = new Date(pT * 1000 + tzDiff);
var tTimeMS:Date = new Date(tT * 1000 + tzDiff);
&lt;/pre&gt;

HTH.

:Nirav</description>
		<content:encoded><![CDATA[<p>Hi Peter,</p>
<p>Thanks for the examples. Just playing around with it..</p>
<p>The video time display is incorrect though. Since Flex creates new dates in the local time zone, if your timezone is not GMT, you will get incorrect time display. (It shows 30:01 for me instead of 00:01 since I am in GMT+530).</p>
<p>Here&#8217;s a fix for that:</p>
<p>In the <code>videoDisplay_playheadUpdate()</code> function:</p>
<pre class="code">
var tzOffset:Date = new Date();
// This takes it one day in future minus the time zone offset
var tzDiff:Number = (86400 - tzOffset.getTimezoneOffset()*60) *1000;
var pTimeMS:Date = new Date(pT * 1000 + tzDiff);
var tTimeMS:Date = new Date(tT * 1000 + tzDiff);
</pre>
<p>HTH.</p>
<p>:Nirav</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-201</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 19 Apr 2008 20:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-201</guid>
		<description>Hi Sam,
the strange slider movement could be avoided.
Put the following line
&lt;pre class=&quot;code&quot;&gt;
slider.value = videoDisplay.playheadTime;
&lt;/pre&gt;

as last line into the function:
&lt;pre class=&quot;code&quot;&gt;
private function videoDisplay_playheadUpdate():void {
&lt;/pre&gt;

and remove (delete)
&lt;pre class=&quot;code&quot;&gt;
value=&quot;{videoDisplay.playheadTime}&quot;
&lt;/pre&gt;

from the attributes of HSlider slider in the MXML part.

Thats it.

Btw.: Thank you Peter for this nice example.</description>
		<content:encoded><![CDATA[<p>Hi Sam,<br />
the strange slider movement could be avoided.<br />
Put the following line</p>
<pre class="code">
slider.value = videoDisplay.playheadTime;
</pre>
<p>as last line into the function:</p>
<pre class="code">
private function videoDisplay_playheadUpdate():void {
</pre>
<p>and remove (delete)</p>
<pre class="code">
value="{videoDisplay.playheadTime}"
</pre>
<p>from the attributes of HSlider slider in the MXML part.</p>
<p>Thats it.</p>
<p>Btw.: Thank you Peter for this nice example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-200</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 17 Apr 2008 10:21:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-200</guid>
		<description>Hi peter,

Thanx for all the examples, great work!

Regarding the scrubber, I noticed that after the slider_thumbRelease the slider jumps for a second back to the original slider_thumbPress position. How can this be avoided?
...when I do a &#039;trace(videoDisplay.playheadTime) after videoDisplay.playheadTime = slider.value in the slider_thumbRelease method, I get the time of the original location and NOT the new location.

thanks again</description>
		<content:encoded><![CDATA[<p>Hi peter,</p>
<p>Thanx for all the examples, great work!</p>
<p>Regarding the scrubber, I noticed that after the slider_thumbRelease the slider jumps for a second back to the original slider_thumbPress position. How can this be avoided?<br />
&#8230;when I do a &#8216;trace(videoDisplay.playheadTime) after videoDisplay.playheadTime = slider.value in the slider_thumbRelease method, I get the time of the original location and NOT the new location.</p>
<p>thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lab</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-199</link>
		<dc:creator>lab</dc:creator>
		<pubDate>Sun, 20 Jan 2008 05:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-199</guid>
		<description>Hey peterd ,

It has defects?

I slidered the thumb on right, and I saw the title have updated to &quot;cuepoints.flv(seeking)&quot;. but the video doesn&#039;t play anymore, it was stuck there.

Any suggestion?

Cheers</description>
		<content:encoded><![CDATA[<p>Hey peterd ,</p>
<p>It has defects?</p>
<p>I slidered the thumb on right, and I saw the title have updated to &#8220;cuepoints.flv(seeking)&#8221;. but the video doesn&#8217;t play anymore, it was stuck there.</p>
<p>Any suggestion?</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-198</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 06 Nov 2007 14:44:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-198</guid>
		<description>SaltamonteZ,

Are you sure the entire video has loaded? I assume you can&#039;t scrub past a point in a video if it hasn&#039;t loaded yet.

Peter</description>
		<content:encoded><![CDATA[<p>SaltamonteZ,</p>
<p>Are you sure the entire video has loaded? I assume you can&#8217;t scrub past a point in a video if it hasn&#8217;t loaded yet.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SaltamonteZ</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-197</link>
		<dc:creator>SaltamonteZ</dc:creator>
		<pubDate>Tue, 06 Nov 2007 14:07:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-197</guid>
		<description>Nice player!
One question, though. What if I actually WANT &quot;liveDragging&quot;, meaning that I could scrub through the vid getting an update on what is to be seen while I´m dragging the thumb?

I thought adding something like this should do the trick... but it doesn&#039;t :(

&lt;pre class=&quot;code&quot;&gt;
private function slider_thumbPress():void
{
    videoDisplay.pause();
}

private function slider_thumbDrag():void
{
    videoDisplay.playheadTime = slider.value;
}

private function slider_thumbRelease():void {
    videoDisplay.play();
}
&lt;/pre&gt;
and
&lt;code&gt;

&lt;/code&gt;

Any Ideas? The thumb just gets stuck at the first half of the flv and doesn&#039;t move any more while the flv stops.</description>
		<content:encoded><![CDATA[<p>Nice player!<br />
One question, though. What if I actually WANT &#8220;liveDragging&#8221;, meaning that I could scrub through the vid getting an update on what is to be seen while I´m dragging the thumb?</p>
<p>I thought adding something like this should do the trick&#8230; but it doesn&#8217;t :(</p>
<pre class="code">
private function slider_thumbPress():void
{
    videoDisplay.pause();
}

private function slider_thumbDrag():void
{
    videoDisplay.playheadTime = slider.value;
}

private function slider_thumbRelease():void {
    videoDisplay.play();
}
</pre>
<p>and<br />
<code></p>
<p></code></p>
<p>Any Ideas? The thumb just gets stuck at the first half of the flv and doesn&#8217;t move any more while the flv stops.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-195</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Wed, 22 Aug 2007 13:25:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-195</guid>
		<description>SMackhead,

It shouldn&#039;t be hard at all. The only trick would be you would need to send the data to a server-side script to write out the XML data to a file remotely. Due to security reasons, Flash Player cannot create files on a user&#039;s machine (unless you&#039;re creating an Adobe AIR project).

Peter</description>
		<content:encoded><![CDATA[<p>SMackhead,</p>
<p>It shouldn&#8217;t be hard at all. The only trick would be you would need to send the data to a server-side script to write out the XML data to a file remotely. Due to security reasons, Flash Player cannot create files on a user&#8217;s machine (unless you&#8217;re creating an Adobe AIR project).</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SMackhead</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/comment-page-1/#comment-196</link>
		<dc:creator>SMackhead</dc:creator>
		<pubDate>Wed, 22 Aug 2007 05:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-196</guid>
		<description>Player is great! Quick question. How hard do you think it would be to capture the playhead time into an xml file for captions?
Thanks!</description>
		<content:encoded><![CDATA[<p>Player is great! Quick question. How hard do you think it would be to capture the playhead time into an xml file for captions?<br />
Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
