3 Replies Latest reply on Apr 8, 2008 7:03 AM by chris.huston.t10

    Timed Text captioning in Flex?

    Handycam Level 1
      Has anyone used a Timed Text xml file for use in captioning video played in Flex?

      I have used this in Flash CS3 using its FLVPlaybackCaptioning component and FLV player. Is there something analogous in Flex>
        • 1. Re: Timed Text captioning in Flex?
          You could probably use the timer class for that. Get whatever starts your video to start the timer as well.

          You could then have an arrayCollection of items with two properties - the timer interval for that item (number of milliseconds) and the string that populates your textbox. So the timer checks at specified intervals and if it found a match for that interval it would pass the string to the textbox.
          • 2. Re: Timed Text captioning in Flex?
            slaingod Level 1
            You can almost certainly export any component in Flash for use in Flex. At the worst, you could simply put a wrapper swf around the component that simply had all of the AS3 API calls for that component exposed in your components as3 class defintion. Then load it with SWFLoader.

            There is probably some way to automate that with a SWC, but I haven't used them that much for that kind of situation, as they add some size overhead in my experience.
            • 3. Re: Timed Text captioning in Flex?
              chris.huston.t10 Level 3
              I developed my own captioning system using Flex. Although I store my captions in a database, the basic approach would work with xml. I use text boxes that I overlay over the basic Flex video component. The database records store cuepoints that I attach to the video. I use a property that determines if the caption should be displayed or removed. It is not quite as easy as using the Flash CS3 component, but it gets the job done and allows for a lot of flexibility in how the captions are displayed.