3 Replies Latest reply on Dec 11, 2007 12:54 PM by Newsgroup_User

    Flv cue point script

    SM6601 Level 1
      Does anyone have a script that will make the movie go to and play another frame of the movie when a Flash video cue point is reached?
        • 1. Re: Flv cue point script
          Level 7
          SM6601,

          > Does anyone have a script that will make the movie go to
          > and play another frame of the movie when a Flash video
          > cue point is reached?

          Actually, the solution is right in the Help docs! It depends on what
          mechanism you're using to display your video, though. Presumably, you're
          using the FLVPlayback component, but there are a couple other ways to
          display video in Flash. What technique are you using? Let me know that,
          and I'll step you through the ActionScript you'll need.


          David Stiller
          Co-author, Foundation Flash CS3 for Designers
          http://tinyurl.com/2k29mj
          "Luck is the residue of good design."


          • 2. Re: Flv cue point script
            SM6601 Level 1
            Thanks Dave, I'm using the FLVPlayback component. I know the actionscript is easy, but I haven't found a simple solution yet.
            • 3. Re: Flv cue point script
              Level 7
              SM6601,

              > Thanks Dave, I'm using the FLVPlayback component. I
              > know the actionscript is easy, but I haven't found a simple
              > solution yet.

              You'll need an Object instance to act as your liaison on ActionScript
              2.0. The event handler gets routed through that object, and you can assign
              your function like this:

              var listener:Object = new Object();
              listener.cuePoint = function(evt:Object):Void {
              // instructions here
              }
              videoPlayer.addEventListener("cuePoint", listener);

              So there's the object, then the function assigned to the object's
              "cuePoint" property. The cuePoint property is created right there in line
              two, because this is a generic Object instance. The function is assigned to
              that. Finally, your FLVPlayback instance (here given the instance name
              videoPlayer) subscribes to the cuePoint event in the final line.

              I wrote up a more comprehensive blog entry on this topic not too long
              ago:

              http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points

              ... but the above few lines should do it for you. Write back if you
              continue to have questions. :)


              David Stiller
              Contributor, How to Cheat in Flash CS3
              http://tinyurl.com/2cp6na
              "Luck is the residue of good design."