0 Replies Latest reply on Nov 19, 2007 2:35 AM by ThomasViktil

    CuePointManager Class

    ThomasViktil
      Hello!

      I'm experiencing some strange behavior when using the CuePointManager
      class. It doesn't seem to be able to sort the cue points correctly.

      My cue points are loaded from a database using AMFPHP 1.9, and then
      put into an array. I've also created a static array in the
      actionscript, just to compare the results, and they are identical. So,
      I've excluded the formatting of the result as a possible source for
      this strange behaviour.

      The cue points are attached to the VideoDisplay component like this:

      videoDisplay.cuePointManager.setCuePoints(cuePoints);

      where cuePoints is an Array, and videoDisplay is the id for the
      videoDisplay component.

      It seems to be going fine, but it doesn't. When I trace the Array
      after getting it from AMFPHP it looks right. But when I trace the cue
      points from the videoDisplay component, the sorting is not only
      reversed, but all cue points placed before 10 seconds are also
      reversed.

      The sorting of the Array after getting it from the database:
      3.05
      5.8
      7.43
      12.48
      14.5
      18.5
      21.44
      23.57
      27.06
      34.3
      50.9

      The sorting after attaching it to the VideoDisplay component:
      50.9
      34.3
      27.06
      23.57
      21.44
      18.5
      14.5
      12.48
      3.05
      5.8
      7.43

      In the first example the Array starts with the lowest number and ends
      up at the highest, which is how I like it. But after adding it to the
      VideoDisplay component, it starts at the top, going down to 12.48, and
      then reverses the order of the lower numbers.

      I can't find any solution to this. Am I doing it wrong, or is there
      something wrong with the CuePointManager class?


      Best regards,
      Thomas Viktil
      Onkel Estrup AS