0 Replies Latest reply on May 7, 2009 11:36 AM by brian914

    Getting to the next/previous cue point

    brian914 Level 1

      I have the following AS and am NOT using the FLV component.

       

      ns.onMetaData = function(infoObject:Object) {

          cuePtArray(infoObject);

      };

       

      function cuePtArray(metaProp:Object):Void {

      var p:String;

          for (p in metaProp) {

              switch (p) {

              case "cuePoints" :

                  //cycles through the cue points

                  var cuePointArr:Array = metaProp[p];

                  for (var j:Number = 0; j < cuePointArr.length; j++) {

                      var currentCuePoint:Object = metaProp[p][j];

                      var metaPropPJParams:Object = currentCuePoint.parameters;

                  }

                  break;

              }

          }

      }

       

      nextBtn.onRelease = function():Void {

      ns.seekToNextNavCuePoint();

      }

       

      backBtn.onRelease = function():Void {

      ns.seekToPrevNavCuePoint();

      }

       

       

      I would somehow like to get the back and Next buttons to skip to the next/previous cue point from where the playhead currently is. How would I do that?

      My cue points are named: cue0, cue1, cue2, etc...

      Somehow I guess I would have to keep track of what cue points have been passed? Is there an easier way?

       

      Thanks a lot!