1 Reply Latest reply on May 30, 2007 11:16 AM by 2w5hrbsfVsz

    FLV Cue Points and Event Listeners

    techsupportrich
      Im trying to create a file which sends a movie clip to key frames when cue points are hit in an flv playback component on the main stage. Here is the code I'm using at the moment...

      stop();

      var displayListener:Object = new Object();
      displayListener.cuePoint = function(eventObj:Object) {
      var index = String(eventObj.cuePointName);

      if (index="introductionText") {
      _root.animationMovie.gotoAndStop(2);
      }
      if (index="bayCollection") {
      _root.animationMovie.gotoAndStop(3);
      }
      if (index="dualWaterfall") {
      _root.animationMovie.gotoAndStop(4);
      }
      };
      screen.addEventListener("cuePoint", displayListener);

      The plan is that when the movie (screen) hit the right cue points, then the animationMovie movieclip jumps to the frames in the code.

      Everything is working fine apart from the fact that as soon as the first cue point is hit in the video, the animationMovie jumps straight to the last frame listed, which is frame 4 for the purposes of this post. Every time I either add or remove one of the if statements, the animationMovie still jumps to the last if statement and carries it out.

      I'm sure that I'm missing something very simple here, can anyone help?