0 Replies Latest reply on Sep 29, 2008 9:55 AM by muskiemania

    mx:videodisplay.totalTime = -1

      I am trying to build a custom-progress bar which includes both the download progress as well as the play progress of an mx:videodisplay control, and allows the user to seek based on where on the progress bar they click.

      Here's how I am doing it:

      capture the position of the click from mouseEvent
      use it to calculate a percentage for how far down the progress bar the click occurred (0.0-1.0)
      multiply percentage by video.totalTime to determine what the desired time is
      set playheadTime equal to desired time

      My problem is that the totalTime property is returning -1. The video, however, remains playing, and the playheadTime property is legit too - the clock still counts up every second of the video as it plays. But since the totalTime property is -1 everything else gets screwed up, and when I attempt to seek anywhere, i get Error 1003: Invalid Seek - understandable since seeking to a negative time doesn't make sense.

      Any information anyone has about how the totalTime property is calculated would be appreciated. Also below are a couple pieces of the code: