1 Reply Latest reply on Apr 22, 2007 11:47 PM by QuickStick

    Cue point Woes.

      I just can't understand it. I've read though the help docs and looked at numerous code samples but i just can't find out what the hell i'm doing wrong. Help!

      ok. so on my stage i've got this.


      on my application initalize, i've got
      theVideo.source = "edit.flv";

      ..my video plays fine.

      I've got a button to set up cue points.

      private function updateCuePoints():void {
      var i:int = new int;

      for(i=0; i<1; i++) {
      var cueObj:Object = new Object;
      cueObj.cueTitle = "cue1";
      cueObj.cueTime = 10;

      createCuePoint(cueObj.cueTitle, cueObj.cueTime);

      private function createCuePoint(cTitle:String, cTime:String):void {
      var cuePt:Object = new Object(); //create cue point object
      cuePt.time = Number(cTime);
      cuePt.name = cTitle;
      cuePt.type = "actionscript";
      theVideo.cuePointManager.addCuePoint(cuePt); //add AS cue point

      this is where i get the error ...it insists i'm referencing a null object or method, but all the livedocs says otherwise. Also, that button is a manual click until i get this bloody thing working. (and no, its not clicked before the video is playing.)-

      Of course, I have my imports too..

      import mx.events.CuePointEvent;

      import mx.controls.videoClasses.CuePointManager;

      somebody PLEASE help :<
        • 1. Re: Cue point Woes.

          Firstly, I haven't got to video in Flex yet, but here's a crack at it for you.

          Looking at:
          cuePt.time = Number(cTime);
          cuePt.name = cTitle;
          cuePt.type = "actionscript";

          According to the CuePointManager reference, the function addCuePoint() requests the parameters:

          array - the Array of all cue points.
          index - the index into the Array for the returned cue point.

          Therefore, if I'm right, it's giving you the error because it has no idea what you mean by time, name or type.

          Hopefully, that helps you.

          Let me know how you go, and if I'm off the mark, I'll give it another look for you.