13 Replies Latest reply on Jul 31, 2008 2:45 AM by Hector_McDougal

    cuepoints over 100

    Joanne-678
      Hi
      I'm trying to control the flv files using xml.
      The format for setting cuepoints normally is 00.00.00.000
      However action script requires you enter a number so the above is not allowed. You can use 00.000 i.e. up to 99.999 however when you reach 100.000 it stops working.
      I noticed someone had the same query last year so I'm hoping that someone has found a workaround since then!
        • 1. Re: cuepoints over 100
          Level 7
          Joanne-678,

          > The format for setting cuepoints [for FLVs] normally is 00.00.00.000

          I'm with ya.

          > However action script requires you enter a number so the above
          > is not allowed. You can use 00.000 i.e. up to 99.999 however
          > when you reach 100.000 it stops working.

          How are you coding this? Are these numbers something you're setting
          with ActionScript, or via the video import wizard? If 99.999 refers to
          seconds, that amounts to one minute, 39 seconds, and 999 milliseconds. In
          the 00.00.00.000 format, that could also be displayed as 1.39.999, and one
          more second than that would be 1.40.999.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: cuepoints over 100
            Joanne-678 Level 1
            Hi
            I'm using action script (flash professional 8)
            I have videos of 8-15 mins duration and I want to have a cue points throughout.
            I'm after downloading a trial version of cs3 which as an import/export cuepoints function on flash encoder which is a workaround (for 30 days.)
            I saw from that that it uses miliseconds so I'm after putting in the milliseconds code in the flash 8 xml (i.e. 2:12.717 = 133717) file but it falls over too.
            I haven't tried that on CS3 but I guess I can.
            I would prefer not to have to buy another version though!
            • 3. Re: cuepoints over 100
              Greg Dove Level 4
              If you are using FLVPlayback that's correct: cuepoints in work in seconds. You can set them to 3dp, but in practice the precision for when actionscript-based cuepoints fire is determined by the playheadUpdateInterval setting. From memory I think the livedocs says the default precision is 100 ms. The cuepoint name and timecode are two separate things. A cuepoint could be called 'yeehaa' with a timecode of 127.773

              I have no issues with setting them above 100.000 - I'm doing something similar from xml and its working fine. Only thing I can suggest is that if you are using flash 8 make sure you have the upgraded the FLVPlayback component. There was a bugfix release mid 2006... although I can't recall it being related to anything like what you describe (I think it was to do with problems playing 2 flvs in sequence...can't recall exactly).
              • 4. Re: cuepoints over 100
                Greg Dove Level 4
                Oops two replies before my post...
                David, I'll leave this in your capable hands.
                Two thoughts:
                a) I don't know what happens if you pass a string value representation of a number to FLVPlayback.addASCuePoint() .. I'd imagine it should convert to number.. but perhaps its safest to check that's done first.
                b) (David I think you're already heading in this direction) What is the timecode format in the xml source and if its not in seconds how is it being converted.
                • 5. Re: cuepoints over 100
                  Joanne-678 Level 1
                  Hi
                  I was reading in from an xml file
                  <slide>slide01</slide>
                  <time>00.00</time>
                  using "slide" as the name and "time" as the timecode

                  The following is the code I use in the action script
                  my_FLVPlybk.addASCuePoint(masterArray[initialIndex][8][f_i][1], masterArray[initialIndex][8][f_i][0].toString(),"navigation");

                  it looks confusing but the values passed are correct.
                  I've passed the name as a string but left the time as a number.

                  I have changed the number to the millisecond representantion but that doesn't work either.

                  Because CS3 allows you to import XML files I can use that for this project. HOwever it would be nice to be able to include everything in the one xml file which specifies the entire session (and also it annoys the heck out of me when I can't figure it out :) )
                  • 6. Re: cuepoints over 100
                    Level 7
                    Joanne-678,

                    > I'm using action script (flash professional 8)

                    That's no problem.

                    > I'm after downloading a trial version of cs3 which as an
                    > import/export cuepoints function on flash encoder which
                    > is a workaround (for 30 days.)

                    The importer is nice, because you can work with XML files for
                    convenience, but Flash 8 does allow you to specify cuepoints
                    visually/manually in the import wizard (see Advanced Settings) on the
                    Encoding page of the wizard.

                    > I haven't tried that on CS3 but I guess I can.

                    The upgrade is terrific, but you don't need it for what you're trying to
                    do.

                    When you say you're using XML, I'm not sure what that means in this
                    particular scenario. XML is as malleable as it gets, so there's really no
                    telling (without further detail) how you're using XML to accomplish what
                    you're after. Ultimately, though, it's not the XML that matters ... XML
                    files are nothing more than a text-file way to convey data to a SWF. You
                    could define these cuepoints entirely in ActionScript, if need be -- though
                    depending on the number of cuepoints and video files, XML is almost
                    certainly more convenient. ;) Just remember that data in XML will come
                    into your SWF as text, so you may need to convert strings into numbers,
                    Booleans, and so on.

                    Like GWD, I've had no problems specifying cuepoints beyond 99.999
                    seconds.


                    David Stiller
                    Adobe Community Expert
                    Dev blog, http://www.quip.net/blog/
                    "Luck is the residue of good design."


                    • 7. Re: cuepoints over 100
                      Greg Dove Level 4
                      Ok...one quick reply.. perhaps you've already done this at the time you populated your masterArray from the xml... but just in case:
                      The XML source will return a string for the content in the XML (as2 code example)

                      var myXML:XML = new XML("<time>100.000</time>")
                      var numberContent = myXML.firstChild.firstChild.nodeValue
                      trace(numberContent); //traces 100.000

                      trace(typeof numberContent) //traces string... needs to be converted to number with Number()
                      • 8. Re: cuepoints over 100
                        Greg Dove Level 4
                        @David that lag with your posts arriving gets me every time. You already said the same thing as my last post. I should've done what I said earlier and left it to you...
                        • 9. Re: cuepoints over 100
                          Level 7
                          GWD,

                          > @David that lag with your posts arriving gets me every time. You
                          > already said the same thing as my last post. I should've done what
                          I said earlier and left it to you...

                          Haha, no worries! I wouldn't have stated my reply any better than you
                          did yours. :)


                          David Stiller
                          Adobe Community Expert
                          Dev blog, http://www.quip.net/blog/
                          "Luck is the residue of good design."


                          • 10. Re: cuepoints over 100
                            Joanne-678 Level 1
                            thanks a million lads: I had searched for toNumber thinking it would be the same format as toString and when I didn't find it I thought that there wasn't such a function - duh!
                            • 11. cuepoints over 100
                              LynxDaemon
                              Sorry to dig out a old post, but I got the same problem and haven't found the answer yet. I upgrade the component and make shure it's a Number(), but it still doesn't work.

                              My code look like this:
                              myVid.addASCuePoint(Number(captions[z].attributes.cue), captions[z].firstChild.nodeValue);

                              While "Number(captions[z].attributes.cue" come from an xml and show a number, and captions[z].firstChild.nodeValue a string. It works perfectly fine until I go over 100 seconds. Any idea?...
                              • 12. Re: cuepoints over 100
                                Rothrock Level 5
                                I would recommend against casting as a Number(). With XML there could be hidden characters or what have you that can cause it to fail.

                                The proper function to use when you have something you want to change to a number is parseInt() or parseFloat() -- I've never seen those fail.
                                • 13. Re: cuepoints over 100
                                  Hector_McDougal
                                  I have the same problem as LynxDaemon in flash 8, AS2. Any cuepoint over 100 causes it to stop working properly. Very annoying.