Simple Flash Video Cue Point Problem (I assume)

Hello everyone. Quick question. After I have added a cue
point to an end of a video, how can I have the cue point trigger an
action such as "gotoAndPlay" or "fscommand("quit");" etc.?
I thought this would be an easy thing to find by checking on
the various websties for other posts or tutorials but nothing I
found addressed this. Any info will be most appreciated.
Thanks.

You don't even need a cuepoint to do this.
Using the FLVComponent or the VideoPlayer object, use the
"complete" event to execute code. You set up an event listener
object to listen to the video object (using
videoobject.addEventListener(listenerObject) ), and create a
function for the listener object to do when the "complete" event
occurs (such as listenerObject.complete = function() { do whatever
Here's a link to a useful pdf about the VideoPlayer object.
http://download.macromedia.com/pub/documentation/en/flash/fl8/VideoPlayer.pdf

Similar Messages

  • Flash Video Cue Points don't work

    I used the template sample from Adobe named :Flash video
    template: Showcase website for personal video...I followed all the
    steps sugested. I used Flash Video Encoder, created the cue points,
    worte down the location of those cue points, which I wrote exactly
    in the Settings.XML file for each chapter....etc. I guarantee you
    that I did it all as sugested...In fact several months ago, it
    worked for another project and another videos that I had.
    But this time, when I am testing it, the video appears in the
    screen all right but when I select a chapter for the section of
    that video, an error appears like this :
    VideoError: 1003: Invalid seek
    at fl.video::VideoPlayer/seek()
    at fl.video::FLVPlayback/seek()
    at
    Video_fla::MainTimeline/chapterClickHandler()[Video_fla.MainTimeline::frame1:184]
    VideoError: 1003: Invalid seek
    at fl.video::VideoPlayer/seek()
    at fl.video::FLVPlayback/seek()
    at
    Video_fla::MainTimeline/chapterClickHandler()[Video_fla.MainTimeline::frame1:184]
    My Settings file has the correspondent locations for each cue
    point, like this :
    <?xml version="1.0" encoding="utf-8"?>
    <showcase>
    <!-- Video section #1: Safety Fair 2008 -->
    <section>
    <title>Safety Fair 2008</title>
    <video>video/MOPS_safetyFair.flv</video>
    <cuepoints>
    <cuepoint>
    <title>Fire Department 1</title>
    <time>00:00:13.291</time>
    <image>img/Gath1.png</image>
    <caption>What to do in case of a fire at
    home...</caption>
    </cuepoint>
    <cuepoint>
    <title>Fire Department 2</title>
    <time>00:01:39.686</time>
    <image>img/Poison Center.png</image>
    <caption>How to escape from a fire at
    home</caption>
    </cuepoint>
    <cuepoint>
    <title>Crime Stoppers</title>
    <time>00:01:51.869</time>
    <image>img/TxDepTra.png</image>
    <caption>Buckle up...</caption>
    </cuepoint>
    <cuepoint>
    <title>Texas Dep of Transportation</title>
    <time>00:01:51.869</time>
    <image>img/Poison Center.png</image>
    <caption>Assistance by phone in case of
    emergency...</caption>
    </cuepoint>
    <cuepoint>
    <title>Poison Center</title>
    <time>00:02:02.946</time>
    <image>img/Gathering3.png</image>
    <caption>Mops Gathering at the FLC Picnic
    area</caption>
    </cuepoint>
    <cuepoint>
    <title>Fellowship</title>
    <time>00:02:09.591</time>
    <image>img/Kids-with-Jenny.png</image>
    <caption>Nice visit and gathering w/our
    children</caption>
    </cuepoint>
    </cuepoints>
    </section>
    I have my file structure right as well in each folder IMG and
    VIDEO.
    What does this error means and how can I correct the
    problem.....I have been expending hours trying different ways and
    still can't get it to work.
    Thanks,
    Edna

    you don't need a cuepoint to detect the end of your video.  use:
    var lo:Object = {};
    lo.complete = function(eObj:Object):Void {
    next_btn._visible=true;
    flv_pb.addEventListener("complete", lo);   // <- use the instance name of your flvpb component

  • Handling Flash video cue points in Javascript

    Can any kind person give me any pointers on how to get Javascript in an HTML page containing an FLV video to listen for cue points in the video? I understand how to get the cue points in, but most people only seem to want to handle the cue point events within Flash. I want to use Javascript to display a different text in a page element at each point. Does the method vary depending on what player you're using? How about when it's the standard Flash playback component? Does there need to be any special Actionscript in the SWF containing the FLV?
    Thanks
    Fred

    Thanks Rob, will do.
    For anyone else looking into this issue there are some links to the ActionScript documentation on this StackOverflow post and an explanation of how to use ExternalInterface halfway down the page in this Adobe Devnet tutorial.
    Presumably you'd first import the ExtenalInterface class into your Flash with
    import flash.external.*;
    And then add an ActionScript event listener which sends the ID of each cue point out to the Javascript using the ExternalInterface.call() method:
    ExternalInterface.call(methodName:String, [parameter1:Object])

  • Video Cue Point problem

    I have an FLV loaded into a video player component. The FLV
    has embedded cue points, from Flash video encoder:
    <mx:VideoDisplay id="vidScreen"
    cuePoint="cpHandler(event)" />
    And the handler:
    private function cpHandler(event:CuePointEvent):void {
    Alert.show(event.cuePointName);
    It works, since the Alert boxes open on cue and show the name
    of the cue point. However, if I try to get the array of cue points
    with something like trace(vidScreen.cuePoints) I get null. I need
    to get the array, since I want to do something on each of the items
    in the array of cue points. What am I missing here?

    You don't even need a cuepoint to do this.
    Using the FLVComponent or the VideoPlayer object, use the
    "complete" event to execute code. You set up an event listener
    object to listen to the video object (using
    videoobject.addEventListener(listenerObject) ), and create a
    function for the listener object to do when the "complete" event
    occurs (such as listenerObject.complete = function() { do whatever
    Here's a link to a useful pdf about the VideoPlayer object.
    http://download.macromedia.com/pub/documentation/en/flash/fl8/VideoPlayer.pdf

  • Flash video - Cue Points

    I've just added some external FLV playback in a project that I am currently completing.
    I've currently set my navigation button (next_btn) set to invisible when the page loads (forcing the user to watch the video).
    Can I set a cue point in the video to change the state of the next button (i.e. next_btn._visible = true;) ?

    you don't need a cuepoint to detect the end of your video.  use:
    var lo:Object = {};
    lo.complete = function(eObj:Object):Void {
    next_btn._visible=true;
    flv_pb.addEventListener("complete", lo);   // <- use the instance name of your flvpb component

  • Streaming .flv cue point problem

    I’ve been working with Flash video with synced slide
    presentations since February, which have been exclusively download
    streaming, all based on the presentation available at the adobe web
    site:
    http://www.adobe.com/devnet/flash/articles/vidtemplate_corppreso.html
    My issue has come up when using this template with streaming
    flv’s, the buttons that I use to reference the cue points in
    the video and slides on the timeline do not work reliably;
    sometimes they will shuttle the video and slides to the correct
    point, usually they move the slides on timeline to the appropriate
    spot and the video jumps back to the beginning. Besides this
    sizable problem, the presentation plays the way it is supposed to.
    Is there a setting in the component inspector that I’m
    missing? Should I re-encode the video with Navigation cue points?
    Any help would be appreciated.
    L

    If you look at the source code for the first link you'll find this at line 71:
    <p id="player1" style="margin: 0px; padding: 0px; text-align:center;"><embed type="application/x-shockwave-flash" src="http://www.thebellyfatsolution.com/flvplayer.swf" style="" id="player1" name="player1" quality="high" wmode="transparent" allowscriptaccess="always" allowfullscreen="true" flashvars="height=390&amp;width=504&amp;file=http://www.thebellyfatsolution.com/beta/video/BellyFatFINAL_6_30_nL.flv&link=http://www.th ebellyfatsolution.com/beta/video/BellyFatFINAL_6_30_nL.flv" height="390" width="504"></p>
    <p><noscript>
    Apparently your video has been encapsulated in JWPlayer. You can find out more about JWPlayer here: http://www.longtailvideo.com/players
    This seems to be yet another solution to a problem that doesn't exist, and whoever runs that website fell for the sales pitch.

  • Video cue point question

    Is it possible to jump to a cue point directly when loading a new video?
    I have a video for one of my sections on my flash web site and depending on from where the user is coming from, they either start to view at the beginning of the FLV, or at a cue point about 10 seconds in. Is that possible? Would there be any loading issues here? Would it load the 10 seconds, or if told to go to that cue point, would it start to load from that point?
    Thanks a lot!

    try:
    var myVideo:Video = new Video();
    addChild(myVideo);
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    myVideo.attachNetStream(ns);
    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
    ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
    ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
    ns.play("video/testFLV.flv");
    ns.client = this;
    function cuePointHandler(infoObject:Object):void
         trace("cuePointHandler called");
         trace("infoObject.name: " + infoObject.name);

  • After Effects video cue point data error #1107

    Hi all,
    I'm trying to create a personalised video using the techniques described here: http://www.adobe.com/devnet/flash/articles/atv_personalized_video.html
    I have created the video and tracking data in After Effects (CS5), converted the tracking data to Flash cue points and exported the .flv file. I can import the video into Flash (CS6) just fine and I can see all the cue point data however when I try to compile the Flash project, bearing in mind this is just an empty stage with an instance of FLVPlayback on it, I get the following errors:
    VerifyError: Error #1107: The ABC data is corrupt, attempt to read out of bounds.
    ReferenceError: Error #1065: Variable Icon is not defined.
    ReferenceError: Error #1065: Variable FLVPlayback is not defined.
    ReferenceError: Error #1065: Variable Main is not defined.
    If I export the .flv without the cue point data I can import, compile and play the video without error.
    I've had a look around and I've not really been able to find any information about this issue and don't have a clue where to start with it.
    Any ideas?!

    Here is the script I used to export the markers as valid XML for Flash to import. Please note that this will export all markers from all layers so if, as I did, you have multiple 'versions' of your tracking data on different layers it will export the whole lot.
    var comp = app.project.activeItem;
    var XMLStart = "<?xml version='1.0' encoding='UTF-8' ?><FLVCoreCuePoints>";
    var XMLEnd = "</FLVCoreCuePoints>";
    var XMLTemp = "";
    var XMLFinal = "";
    var layerCount = comp.numLayers;
    var layer = new Object;
    var layerMarkers = new Object;
    var markerCount = 0;
    var curMarkerTime = 0;
    var curMarkerName = "";
    var curMarkerType = "";
    var curMarkerXML = "";
    //Layer markers
    for(i=1; i<layerCount+1; i++) {
        layer = comp.layer(i);
        layerMarkers = layer.marker;
        markerCount = layerMarkers.numKeys;
        for(j=1; j<markerCount+1; j++) {
            // get the parameters for this marker
            var params = layerMarkers.keyValue(j).getParameters();
            var XMLParam = "";
            var cont = false;
            // loop through parameters
            for(param in params) {
                // I added this conditional to strip out markers in my project which were superfluous
                if(params[param] == "410,230.5") {
                    var cont = true;
                    continue;
                // generate the XML for the parameter
                XMLParam += "<Parameter>";
                  XMLParam += "<Name>" + param + "</Name>";
                  XMLParam += "<Value>" + params[param] + "</Value>";
                XMLParam += "</Parameter>";
            // if this is a superfluous marker then don't add it to the XML string, just go on to the next
            if(cont) {
                continue;
            // get / set additional marker meta data
            curMarkerTime = layerMarkers.keyTime(j) * 1000;
            curMarkerName = layerMarkers.keyValue(j).cuePointName;
            curMarkerType = "actionscript";
            // assemble the full XML element for this cue point
            curMarkerXML = "<CuePoint><Time>" + curMarkerTime + "</Time><Type>" + curMarkerType + "</Type><Name>" + curMarkerName + "</Name><Parameters>" + XMLParam + "</Parameters></CuePoint>";
            XMLTemp += curMarkerXML;
    //Comp markers
    var tempText = comp.layers.addText("");
    var tempSrc = tempText.text.sourceText;
    tempSrc.expression = "thisComp.marker.numKeys";
    markerCount = Number(tempSrc.value);
    if(markerCount > 0) {
        for (i=1; i<=markerCount; i++) {
            tempSrc.expression = "thisComp.marker.key(" + i + ").time;";
            curMarkerTime = Number(tempSrc.value) * 1000;
            tempSrc.expression = "thisComp.marker.key(" + i + ").cuePointName;";
            curMarkerName = String(tempSrc.value);
            tempSrc.expression = "thisComp.marker.key(" + i + ").eventCuePoint;";
            if(tempSrc.value == "true") {
                curMarkerType = "event";
            } else {
                curMarkerType = "navigation";
            curMarkerXML = "<CuePoint><Time>" + curMarkerTime + "</Time><Type>" + curMarkerType + "</Type><Name>" + curMarkerName + "</Name></CuePoint>";
            XMLTemp += curMarkerXML;
    tempText.remove();
    //create output string
    XMLFinal = XMLStart + XMLTemp + XMLEnd;
    //Write file
    var cueFile = File.saveDialog("Save the XML file", "XML:*.xml" );
    cueFile.open("W");
    cueFile.write(XMLFinal);
    cueFile.close();

  • Best way to control graphics synchronized to video cue points

    Hello,
    I've recently completed (well, 'completed' is a strong word)
    a phase one implementation of a synchronized video presentation
    using After Effects and Flash. The basic idea driving the
    synchronization of cue points to motion graphics revolves around
    creating a listener in the following fashion:
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    // Put any code you like here
    trace(&quot;Cue point name: &quot; +
    eventObject.info.name);
    my_FLVPlybk.addEventListener(&quot;cuePoint&quot;,
    listenerObject);
    and then using the cue point name to play a variety of
    movieclips at the appropriate time in the presentation.
    The video presentation had four sections, each of which could
    be arbitratrily browsed to at any point in the presentation, so it
    was important that the the movieclips did not need to play in order
    and that they could be interrupted at any point without an visual
    confusion.
    I dealt with this two ways (I am sure these are not the best
    ways, which is why I am writing this post):
    First, every single movieclip was already on the stage from
    the outset, stopped on the first frame, with the alpha property set
    to 0 (based on Aran Balkan
    http://aralbalkan.com/444).
    The final frame of each clip had a gotoAndStop(1) action on it so
    that when a clip finished playing it 'reset' itself. I also wrote a
    &quot;rewind&quot; function which pretty much did the same
    thing whenever a user clicked on one of the navigational tabs.
    For a first iteration, this worked pretty well, and it
    impressed enough people in my organization (university) that now
    the President wants to deliver a similar message. It seemed prudent
    at this point to ask a general question about best practices in
    this area. I am working with the full Master Collection suite, and
    can target later versions of the Flash Player (I believe I can use
    AS 3.0, although I will have to learn it). One thing that I am
    hoping any pointers you guys might have will cover is this:
    How do you handle starting/stopping/pausing of the video and
    also make sure any currently playing graphical assets also
    start/stop/pause on cue? I was thinking of setting a variable on
    the second frame of each movieclip, something along the lines of
    'nowPlaying = this;' and then resetting that to null at the end of
    the clip and in the rewind function, then using that variable to
    control the currently playing clip (would have to bu just one, I
    imagine).
    But there has got to be a better way. I have some down time
    to do research and to experiment, but it is going to be very high
    profile when it rolls around, so I thought I'd send out some
    feelers.
    Has anyone done anything like this? Seen a better way? Etc .
    Thanks so much.

    Best practice is to keep one single file as long as humanly possible.
    In this case, you "branched" a version for another format; I'd suggest you don't edit that any further (apart from the formatting stuff you mentioned), but inform your client this version is to be worked on. Work on your "real" version until it's really really done, and only then make other versions.
    It's a different story (no pun intended) if the transition between the two versions can be automated; that way you'd still only work on the 'real' version, but then you could generate the other with every edit you make -- you should still not be doing any work in the dumbed-down version.

  • Synchronize flash video navigation points with slides

    Hello,
    i'll have to sync different slides with a captured presentation. i know i can set navigation points in my flash-video. but i haven't found a solution to change the slides when the video reached a certain point. is this possible with indesign? it would be fantastic.
    regards,
    marek

    Thank you Jamesabth and GenaroRG for your responses. Someone
    in the
    flashcom newsgroup pointed out
    http://flowplayer.org/. This
    looks like
    exactly what I've been looking for. I'll give it a try first.
    Thanks,
    Mickey
    "Mickey" <[email protected]> wrote in
    message
    news:fk4krg$ca5$[email protected]..
    > Is it possible to load navigation cue points from an xml
    file like you can
    > do with captions or do they always have to be embedded
    in the encoding?
    >
    > If it's possible, can you PLEASE point me to a resource
    that shows you
    > how? I've searched and searched for weeks and found
    nothing!
    >
    > Thanks,
    > Mickey
    >

  • Video cue point events, or similar?

    Hi,
    In flex, the video GUI control has something called "cue points" -- you can get event callbacks when video playback hits time points of your choosing. This allows you to synchronize the video with other parts of your GUI. Is there something in JavaFX that allows the same thing? If not, are there plans to have it? When?
    thanks,
    Rob

    You don't even need a cuepoint to do this.
    Using the FLVComponent or the VideoPlayer object, use the
    "complete" event to execute code. You set up an event listener
    object to listen to the video object (using
    videoobject.addEventListener(listenerObject) ), and create a
    function for the listener object to do when the "complete" event
    occurs (such as listenerObject.complete = function() { do whatever
    Here's a link to a useful pdf about the VideoPlayer object.
    http://download.macromedia.com/pub/documentation/en/flash/fl8/VideoPlayer.pdf

  • Need several buttons that each target a video cue point but only one works

    I have the code that works for one button to find a cue point but how can I make this work for several buttons and their respective cue points?
      "seek-btn2" to find cue 2(named "lou2")
    import fl.video.*;
    // Video component instance name
    var flvControl:FLVPlayback = display;
    var flvSource:String = "lou.flv";
    // Set video
    flvControl.source = flvSource;
    // Add seek functionality to the button
    function seekHandler(event:MouseEvent):void
       flvControl.seekToNavCuePoint("lou1")
    //seek_btn is the button instance name
    seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
    when i repeat the last part of the code it does not work, thanks for your time....

    Thanks but where would I insert that code and what would I take out from the original code I posted?
    i tried this....
    import fl.video.*;
    // Video component instance name
    var flvControl:FLVPlayback = display;
    var flvSource:String = "lou.flv";
    // Set video
    flvControl.source = flvSource;
    seek_btn1.cuePointName = new String();
    seek_btn1.cuePointName = "lou1";
    seek_btn1.addEventListener(MouseEvent.CLICK, onButtonPress);
    seek_btn2.cuePointName = new String();
    seek_btn2.cuePointName = "lou2";
    seek_btn2.addEventListener(MouseEvent.CLICK, onButtonPress);
    // onButtonPress function
    private function onButtonPress(evt:MouseEvent):void {
         flvControl.seekToNavCuePoint(evt.target.cuePointName);

  • Video cue point navigation please help

    OK I need major help here. I am trying to get a video to
    stream and show pictures that are cued to the video playing. The
    thing is I need to have a next and prev btn for the pictures and
    the video to go to the next and previous cue points. The cue points
    are inbedded in the FLV. Please help

    before the function add the following line:
    import fl.video.MetadataEvent;

  • Need advice on making a simple Flash video file. Trying to accomplish two things.

    I have some video files (.avi) that I am trying to convert to a Flash video format. I am trying to export it to a Flash player to go into a Powerpoint file. With this, I am trying to accomplish two goals:
    1. To have the short clip (15sec, 30fps) endlessly loop, like an animated .gif.
    2. To allow the user to click on the video player and drag left/right to ff/rew.
    The video itself is a turntable animation. One of our products is making a complete 360degree turn. By allowing the user to grab and drag, it will simulate them rotating the model.
    So far, I have already accomplished Goal 1. I made a new Actionscript 3 file, imported video (embed flv in swf and play in timeline), and then made the video loop on the timeline. This seems to export properly, and the video loops as needed. The only thing I can't figure out is how to make the video "interactive" and let the user drag left/right.
    For context, I have never used Flash before. Any help would be greatly appreciated.

    This will come down to essentially moving the playhead of Flash based on the movement of the mouse. It's certainly not going to be smooth however, you'd need a timer to be responsible for moving your playhead and reversing spatial compression is very CPU intensive (moving backwards on the timeline). I'd recommend having a forward and backward version of the video so you could flip between them but if you're new to flash you're already in way above your head.
    Add a new layer and try adding this example script (or Download Source example here, saved to CS5):
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.MouseEvent;
    // make sure we don't trip this frame twice
    if (!stage.hasEventListener(MouseEvent.MOUSE_DOWN))
              // stop playhead
              stop();
              // set state (forwards? backwards?)
              var movingForward:Boolean = true;
              var curFrame:int = 1;
              var mouseStartX:int; // used later to determine drag
              // detect mouse click and drag left or right
              stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseF);
              stage.addEventListener(MouseEvent.MOUSE_UP, onMouseF);
              // create new timer to control playhead, start it
              var phTimer:Timer = new Timer(33,0);
              phTimer.addEventListener(TimerEvent.TIMER, movePlayheadF);
              phTimer.start();
              // function to control playhead
              function movePlayheadF(e:TimerEvent):void
                        curFrame += movingForward ? 1 : -1;
                        // validate frame (60 total frames)
                        if (curFrame > this.totalFrames) curFrame = 2;
                        else if (curFrame < 1) curFrame = this.totalFrames;
                        // goto the next frame
                        this.gotoAndStop(curFrame);
              // function that controls the direction variable
              function onMouseF(e:MouseEvent):void
                        if (e.type == MouseEvent.MOUSE_DOWN)
                                  // user started touching, record start spot
                                  mouseStartX = int(stage.mouseX);
                        else if (e.type == MouseEvent.MOUSE_UP)
                                  // user let mouse go, determine direction change (swipe stype)
                                  if (stage.mouseX > mouseStartX)
                                            // swiped right, move forwards
                                            movingForward = true;
                                            trace('Moving forward now');
                                  else if (stage.mouseX < mouseStartX)
                                            // swiped left, move backwards
                                            movingForward = false;
                                            trace('Moving backwards now');
    This is pretty simple. In the example source link above an object on the timeline (nice ugly red circle) moves right over 60 frames and then left over 60 frames (120 total). Consider that your movie.
    A timer ticks at a speed of 33ms (30fps). This is where it isn't necessarily going to be too smooth with video. If you increase it to 60FPS then decrease the timer by half (16.5ms), season to taste. Each time the timer goes off the playhead is moved, either forwards or backwards.
    To know if it should go forward or backwards a simple variable (movingForward) keeps track of the last 'swipe'. The swipe is simply captured when a user touches the screen (mouse/finger), moves in a direction and then lets up. If they moved to the left the direction will be reverse. If they moved to the right it will move forward. This doesn't take into consideration any more than that logic, but illustrates how you can watch the mouse for movement and "do something" based on it.
    A very simple validatior in the timer event function checks to see if the next frame (in either direction) is valid and if it's not, it corrects it so it stays within your videos timeline length.
    Note there is a MOUSE_MOVE event you can try to hook to which can be used to literally let the user drag the video forwards and backwards the amount they drag their finger/cursor. Also if this is some kind of circular surface like a record spinning, the direction the user moves the mouse based on where they touch the record would change which direction they expect it to move. Etc etc..
    That should get your feet wet in how much you need to consider for your project.

  • Inserting Flash Video causes display problems in Google Chrome

    Hi all,
    I have tried in insert a Flash Video (.flv) into Dreamweaver using the Insert > Media > Flv command.
    The video looks fine in both Firefox and Interent Explorer. The problem is Google Chome does not display the video at all. It shows a white background. As I right+click onto Google Chrome, it says About Flash Player which means it is already installed into the browser.
    Does anybody know how to resolve this issue?
    Thanks!

    clavin007 wrote:
    Does anybody know how to resolve this issue?
    Well certainly not without seeing your code. 
    Please be kind enough to post a link to your page.

Maybe you are looking for