0 Replies Latest reply on Oct 17, 2006 8:53 PM by JimHoskins

    Video length problem

      Im having a small problem, I am trying to build video controls in my application, creating a playhead using an HSlider.

      my video is defined
      <mx:VideoDisplay autoPlay="false" id="video" live="false" >
      <mx:playheadUpdateInterval >25</mx:playheadUpdateInterval>

      and the slider is
      <mx:HSlider maximum="{video.totalTime}" enabled="true" change="setVideo(event)" id="playhead" allowTrackClick="true" value="{video.playheadTime}" >

      the function i used is

      private function setVideo(event:SliderEvent):void {
      var currentSlider:Slider=Slider(event.currentTarget);
      The problem is the totalTime sometimes loads immediately, but most often waits for the video to play through. This causes the slider max to be NaN, removing all functionality.

      Is there a better method for creating the playhead? the files are flvs over http, so not live.
      Thanks for any help