<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Scrubbing an FLV using the VideoDisplay control and a slider</title>
	<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Fri, 05 Dec 2008 09:44:18 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: steve</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-16869</link>
		<author>steve</author>
		<pubDate>Mon, 24 Nov 2008 16:16:37 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-16869</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-16249</link>
		<author>Nirav Mehta</author>
		<pubDate>Sat, 18 Oct 2008 08:35:21 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-16249</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's a fix for that:

In the &lt;code&gt;videoDisplay_playheadUpdate()&lt;/code&gt; function:
&lt;pre class="code"&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-12123</link>
		<author>Anonymous</author>
		<pubDate>Sat, 19 Apr 2008 20:53:13 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-12123</guid>
		<description>Hi Sam,
the strange slider movement could be avoided.
Put the following line 
&lt;pre class="code"&gt;
slider.value = videoDisplay.playheadTime;
&lt;/pre&gt;

as last line into the function:
&lt;pre class="code"&gt;
private function videoDisplay_playheadUpdate():void {
&lt;/pre&gt;

and remove (delete)
&lt;pre class="code"&gt;
value="{videoDisplay.playheadTime}"
&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-12058</link>
		<author>sam</author>
		<pubDate>Thu, 17 Apr 2008 10:21:29 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-12058</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 '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-6221</link>
		<author>lab</author>
		<pubDate>Sun, 20 Jan 2008 05:49:32 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-6221</guid>
		<description>Hey peterd ,

It has defects?

I slidered the thumb on right, and I saw the title have updated to "cuepoints.flv(seeking)". but the video doesn'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-3926</link>
		<author>peterd</author>
		<pubDate>Tue, 06 Nov 2007 14:44:53 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-3926</guid>
		<description>SaltamonteZ,

Are you sure the entire video has loaded? I assume you can't scrub past a point in a video if it hasn'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-3925</link>
		<author>SaltamonteZ</author>
		<pubDate>Tue, 06 Nov 2007 14:07:20 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-3925</guid>
		<description>Nice player!
One question, though. What if I actually WANT "liveDragging", 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't :(

&lt;pre class="code"&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'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-354</link>
		<author>peterd</author>
		<pubDate>Wed, 22 Aug 2007 13:25:29 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-354</guid>
		<description>SMackhead,

It shouldn'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's machine (unless you'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-335</link>
		<author>SMackhead</author>
		<pubDate>Wed, 22 Aug 2007 05:02:50 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-335</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>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-20</link>
		<author>peterd</author>
		<pubDate>Thu, 02 Aug 2007 17:08:39 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/08/02/scrubbing-an-flv-using-the-videodisplay-control-and-a-slider/#comment-20</guid>
		<description>Sorry for the audio, it would appear my speakers were muted while I was building this. I'll mute the audio stream in the FLV and republish the SWF when I get home.

Update @ 8:23pm :: Fixed, volume muted.</description>
		<content:encoded><![CDATA[<p>Sorry for the audio, it would appear my speakers were muted while I was building this. I&#8217;ll mute the audio stream in the FLV and republish the SWF when I get home.</p>
<p>Update @ 8:23pm :: Fixed, volume muted.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
