title: Seek playhead to specific location in Flash Video?
body: <p>If you load up a FLVPlayback component in Flash or VideoDisplay in Flex and try to seek to a specific location or set playheadTime to a specific location, the movie always rounds up or down by very large amounts</p>
  
  <p>In flash, drag a FLVPlayback component to stage and set source to <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv" rel="nofollow">http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv</a>
  Then try to video.seek(6) or video.playheadTime = 6;</p>
  
  <p>It will just goto 10.  Likewise if you use their built in scrubber the only intervals are 0, 5, or 10.  So at most the scrubbing frame you see is 3</p>
  
  <p>Here is an example of flex with the same result.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:media="com.synapsegroup.media.*"&gt;
  
      &lt;mx:Script&gt;
          &lt;![CDATA[
              import mx.events.MetadataEvent;
              import mx.events.SliderEvent;
              import mx.events.VideoEvent;
  
              protected function scrubber_changeHandler(event:SliderEvent):void
              {               
                  trace(event.value);
                  video.playheadTime = event.value;
              }
  
              protected function video_playheadUpdateHandler(event:mx.events.VideoEvent):void
              {               
                  //scrubber.value = event.playheadTime;
                  //http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv
              }
  
          ]]&gt;
      &lt;/mx:Script&gt;
  
      &lt;mx:Panel&gt;
          &lt;mx:VideoDisplay id="video" source="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/examples/assets/phone.flv" minWidth="200" minHeight="200"
                           autoPlay="false"
                           /&gt;
          &lt;mx:ControlBar&gt;
              &lt;mx:Button label="Play" click="video.play();"/&gt;
              &lt;mx:Button label="Stop" click="video.pause();"/&gt;
              &lt;mx:HSlider liveDragging="true" id="scrubber" minimum="0" maximum="11.5" change="scrubber_changeHandler(event)" thumbPress="video.pause();"/&gt;
          &lt;/mx:ControlBar&gt;
      &lt;/mx:Panel&gt;
  
  &lt;/mx:Application&gt;
  </code></pre>
  
  <p>In both cases if you click play/pause fast enough you can pause on individual frames with much more granularity, but thats not a good UX </p>
  
  <p>Is there something I'm missing to do this programatically?</p>
  
  <p>I'd also say that the interval changes depending on the video length, something that was 3minutes long had 10 second intervals</p>