1 Reply Latest reply on Oct 17, 2006 12:30 PM by TimSymons

    Playheadtime and totalTime

      OK i am really stuck, I have a flv file in flash I am using the FLV Custom Component. I need to be able to display the running and total time of the video in two seperat text field on the scene. I can't seem to get this to work. My video is a converted flash swf file to QuickTime then I creat a FLV file from the flash video encoder. Please help
        • 1. Re: Playheadtime and totalTime
          TimSymons Level 1
          There is probably a better way but this should give some idea:

          /// Assume 2 textfields tf1 and tf2 are on the timeline
          // and FLV compoent is named: flc

          this.onEnterFrame = updateTime;
          function updateTime():Void {
          tf1.text = flc.totalTime;
          tf2.text = flc.playheadTime;

          The textfields may display "undefined" for a second, until the metadata for the FLV has loaded and the video has started.