4 Replies Latest reply on Jul 1, 2008 4:49 PM by Newsgroup_User

    determining the current frame/time of video

    Level 7
      I'm using AS2 and would like to create a function to monitor the current
      time of an FLV file in a swf. I'm using the swf in Director and using the
      format sprite (1).flvCode.flvPlay () where sprite (1) is the location of the
      swf, my AS2 code is in a movieClip with an instance name of flvCode and I
      have a function (just or illustration purposes) of flvPlay ()

      I'v looked in the AS2 reference but it's strangely absent of code that would
      provide the current flv time or even the duration of the flv.

      Craig


        • 1. Re: determining the current frame/time of video
          Rothrock Level 5
          Like David told you in your other thread you need to look under the class(es) that you are using. Are you using the FLV playback component? In that case you need to look in the Components Language Reference.

          From there scroll down to FLBPlayback Component.

          In there the FLVPlayback Class will have a listing of everything that is available.

          I'm thinking that FLVPlayback.playheadTime and FLVPlayback.totalTime are probably what you want.

          If you aren't using the playback component then you most likely need to look at the ActionScript 2.0 language reference under the NetStream Class. In that case you will need the onMetaData event to capture the total time for the FLV when it loads and the time property to check the current position.

          So I don't know where you were looking, but there is plenty of code to help you along.
          • 2. Re: determining the current frame/time of video
            Level 7
            Thanks. I'm too much of a novice to even realize that I was asking the same
            question.


            "Rothrock" <webforumsuser@macromedia.com> wrote in message
            news:g4dqhr$58e$1@forums.macromedia.com...
            > Like David told you in your other thread you need to look under the
            > class(es)
            > that you are using. Are you using the FLV playback component? In that case
            > you
            > need to look in the Components Language Reference.
            >
            > From there scroll down to FLBPlayback Component.
            >
            > In there the FLVPlayback Class will have a listing of everything that is
            > available.
            >
            > I'm thinking that FLVPlayback.playheadTime and FLVPlayback.totalTime are
            > probably what you want.
            >
            > If you aren't using the playback component then you most likely need to
            > look
            > at the ActionScript 2.0 language reference under the NetStream Class. In
            > that
            > case you will need the onMetaData event to capture the total time for the
            > FLV
            > when it loads and the time property to check the current position.
            >
            > So I don't know where you were looking, but there is plenty of code to
            > help
            > you along.
            >


            • 3. Re: determining the current frame/time of video
              Rothrock Level 5
              I can be hard to learn what classes do what.

              It sounds like you have a very specific purpose at the moment. But if you want to learn more general stuff, I would recommend a site like kirupa.com or gotoandlearn.com and do some of the tutes there.

              That way you can start to become familiar with the classes. After you get a few basic classes under your belt it gets a lot easier.
              • 4. Re: determining the current frame/time of video
                Level 7
                I'm working my way through the O'Reilly book on AS3. I've been using Lingo
                for 15 years and never believed it would be so hard to learn another
                language. But I'm sure once I do more of it and take some tutes, it will
                start to flow.

                Thanks for your help.

                Craig

                "Rothrock" <webforumsuser@macromedia.com> wrote in message
                news:g4e1m0$cob$1@forums.macromedia.com...
                >I can be hard to learn what classes do what.
                >
                > It sounds like you have a very specific purpose at the moment. But if you
                > want
                > to learn more general stuff, I would recommend a site like kirupa.com or
                > gotoandlearn.com and do some of the tutes there.
                >
                > That way you can start to become familiar with the classes. After you get
                > a
                > few basic classes under your belt it gets a lot easier.
                >