NetStream Cue Points

Tried adding cue points via as3 code but haven't been able to find anyway to accomplish this task. Read allot places that when you load a video via netStream you can't add cue points with actionscript. The only way is to embed the cue points is into the video. But this is not an obtain for me since someone else does the videos and they may change or be modified at some time. I can add actionscript cuePoints with the FLVPlayback component but I am looking for ways of increasing video performace.
By the way what is the difference\advantage of using netStream over using the FLVPlayback component? Often wander this but haven't read anything to say one is better then the other when running video over the web.
Thanks

Thanks kglad. Being able to customize is always better in my flash world. LOL
I'll have to stay with the FLVPlayback component as long as I have to use cue points in my videos.
Thanks

Similar Messages

  • Adding cue points to NetStream

    Hello I have been working on a project and have loaded videos using netstream.  I have several cue points that advance the timeline to a certain keyframe.  Would anyone have the script for NetStream that would do this, for example, when the video reaches cue1 it would advance the timeline to frame 10?
    Thank you so much for your help.
    mark.

    Since no one has yet posted on this, I'll re-post part of a response to another post which deals specifically with using cue points with a NetStream video player:
    OK, here is a working NetStream cue point:
    var ns:NetStream = new NetStream(nc);
    video_screen.attachVideo(ns);
    /* Name of your video, with correct path, goes here */
    ns.play("my_video.flv");
    ns.onCuePoint = function(evt:Object){
        trace(evt.name);
        trace(evt.time);
        if(evt.name == "jump_100") {
            trace("YO !Jump to 100!");
            gotoAndStop(100);
    Reading this code:
    set a new variable "ns" which is a new NetStream
    attach a video to "video_screen"... the instance name of the video on the stage
    now use that variable "ns" to play a video with file name "my_video.flv"
    use ns to listen for an "event" type cue point Object
    when the cue point is detected trace the event name and time
    if the event name is exactly equal to "jump_100"
    then trace "YO !Jump to 100!"
    and then gotoAndStop at frame 100
    For this exact code to work, your NetStream variable must be named "ns"
    In the video you play, there must be a cue point of the "Event" type with the name "jump_100"
    There must be at least 100 frames in the timeline.
    Take it in small steps;
    First make sure you can play the video using NetStream ... that's all.
    Next, add the trace to detect the cue point... if you can't detect it, of course it won't do anything.
    Only after you can successfully play the video and detect the cue point, should you attempt the cue point action (jump to frame 100).
    You can also add more "if" statements if there are multiple cue points.
    If cue point 1, then do this.
    If cue point 2, then do this.... etc.
    Best wishes,
    Adninjastrator

  • Cue Points with netstream

    I've created a custom object without the FlvPlayback
    component. I used the following code:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    myVid.attachVideo(ns);
    ns.play("flv/home/intro.flv");
    That flv file has embedded cue points. How do I access them?
    I can access them easily if I were using the FlvPlayback component,
    but I don't think the cue points are getting through the netstream.
    Any ideas?

    use the ns.onCuePoint event handler.

  • Cue points in dynamically loaded flv file through netstream

    How can i add cue points to a playlist of flv files which are
    loaded dynamically through an xml files. All the sources i have
    found over the internet are using flvplayback control :(

    Lestyn, thanks for the verification.  Took me a frantic 4 hours to arrive at the same conclusion.  Do these people test their software???
    Maddening.

  • Cue points - Non-Component-based, NetStream class to gotoAndPlay?

    Hello all,
    I am trying (unsuccessfully) to utilse cue points in my flv (my_video) to jump to places in my timeline. My flv's are placed within a movieclip if this is helpful? I've learnt alot from this website (Goldmine for anyone needing help) http://www.quip.net/blog/2007/flash/how-to-use-flash-video-cue-points
    but i just don't know enough about coding to get it to work. I've done a trace of my flv and this is the information it came back with;
    onCuePoint:
    parameters =
    web1: website1
    type = event
    time = 3.009
    name = web1
    onCuePoint:
    parameters =
    web2: website2
    type = event
    time = 10.127
    name = web2
    onCuePoint:
    parameters =
    web3: website3
    type = event
    time = 17.866
    name = web3
    I've tried to 'fudge' my way through this but don't understand the language?! I exprted the flv with embeded cue points called web1, web2 & web3 and am trying to get these to jump to the main timeline (out of the mc) to their respective labels (web01, web02 & web03) Whilst I was embedding those cue poitns i also added event names (also web1, 2 & 3) and  values of website1,website2 & website3 -no idea why just thought they had to be filled?
    Just to reiterate i'm not using components and I am using the net stream class.
    Help!
    ...please!
    Here's my code so far;
    ns.onCuePoint = function(evt:Object):Void {
      trace(evt.name);
      trace(evt.time);
      trace(evt.parameters);
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    // Put any code you like here
    trace("web1: " + eventObject.info.name);
    trace("event: " + eventObject.info.type);
    if(eventObject.info.name=="web1"){
    gotoAndStop("web01");
    my_video.addEventListener("cuePoint", listenerObject);

    Thanks kglad. Being able to customize is always better in my flash world. LOL
    I'll have to stay with the FLVPlayback component as long as I have to use cue points in my videos.
    Thanks

  • I need help with my event-based cue points with audio

    Im having trouble with my video game project for my action script 3 class at school. Here is what i did, i made a game called Tailgate toss up. I filmed my character and rendered it in Adobe Premiere. I than brought my .mov file into After Effects and I put event-based cue points-
    my first cue point at 0:00:03:13 called "loop"
    my second cue point at 00:00:03:27 called "draw"
    my third cue point at 00:00:05:24 called "bang"
    my fourth cue point at 00:00:13:29 called "dead"
    my fifth cue point at 00:00:14:29 called "You Lose"
    my last cue point at 00:00:19:14 called "End"
    Here is my action script 3 code
    ///first frame:
    start_btn.addEventListener(MouseEvent.CLICK, startGame);
    function startGame(event:MouseEvent){
    gotoAndStop(2);
    SoundMixer.stopAll()
    stop();
    ///second frame:
    stop();
    var loopTime
    var hitHim:Boolean = false;
    var vConnection:NetConnection = new NetConnection();
    vConnection.connect(null);
    var vStream:NetStream = new NetStream(vConnection);
    var client:Object = new Object();
    client.onCuePoint = onCuePoint;
    vStream.client = client;
    var myVideo:Video = new Video(418, 480);
    myVideo.y = 0;  ///this adjusts where the video is, right now it is the size of the canvas which is 418,480
    addChild(myVideo);
    myVideo.attachNetStream(vStream);
    vStream.play("michelle.flv");
    var throw_bottle:Sound
    throw_bottle = new Sound(new URLRequest("audio/throw_bottle.mp3")); //change to button noise, will add sound into ae file
    target_mc.addEventListener(MouseEvent.CLICK, shoot);
    target_mc.buttonMode = true;
    target_mc.visible = false;
    draw_mc.visible = false;
    function onCuePoint(cuePoint:Object):void {
       if(cuePoint.name == "loop"){
    loopTime = cuePoint.time;
        if(cuePoint.name == "draw"){
    var randomLoop:Number = Math.random()*10;
    if(randomLoop > 2){
    vStream.seek(loopTime);
    }else{
    setChildIndex(target_mc, numChildren - 1);  
    setChildIndex(draw_mc, numChildren - 1);    
    target_mc.visible = true;
    draw_mc.visible = true;
    if(cuePoint.time == "5:24"){
    draw_mc.visible = false;
    target_mc.visible = false;
    if(!hitHim){
    vStream.seek(15);    
    if(cuePoint.name == "dead"){
    vStream.close();
    myVideo.clear();
    gotoAndStop(3);
    if(cuePoint.name == "end"){
    gotoAndStop(3);
    function shoot(event:MouseEvent){
    throw_bottle.play();
    hitHim = true;
    ///my third and last frame
    playAgain_btn.addEventListener(MouseEvent.CLICK, playAgain);
    function playAgain(event:MouseEvent){
    gotoAndStop(2);
    SoundMixer.stopAll()
    stop();
    When I have no audio it works perfectly, no problems. When I bring audio in i re-render it as a .mov file and bring it back into After Effects and add the cue points to it. Than i re-render it out again as a flv file. When i bring it into my flash project it will work when the looping variable does just one loop and my target will appear so you can click on it or not. But when the looping variable makes it loop 2 to 10 times it skips over the catching (the part of the clip if you clip the button) and goes directly to the dropping of the can, not giving you the option of clicking the button. So basically it skips the "draw" or second cue point of my game and goes to "You Lose" cue point.
    Any suggestions?

    Hi,
    The latest audio driver for your machine is on the following link.
    http://ftp.hp.com/pub/softpaq/sp59501-60000/sp59649.exe
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Pause on Cue Point

    I have set a cue point in my FLV at 58 seconds. Can someone
    tell / show me
    how I can add a pause to the video when it reaches that first
    cue point. I
    have it set (intially) called break and it is set to 'Event'.
    Thanks. I am an eager noobie to Flash video and actionscript.

    NetStream events have nothing to do with cue points.
    onCuePoint method belongs to NetStream client. So, you will need
    something like this:
    client.onCuePoint = pointListener;
    function pointListener (cuePoint:Object):void {
    trace(cuePoint.name + " " + cuePoint.time);
    In a nutshell NetStream events are fired when changes occur
    in video delivery (buffer, start, pause, etc.) - not video content.
    More information:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html
    As for your code, your syntax is not correct.
    You wrote: vid.addEventListener(NetStatusEvent.NET_STATUS,
    "myFirstCuePoint");
    If you listener function is myFirstCuePoint you need to
    write:
    vid.addEventListener(NetStatusEvent.NET_STATUS,
    myFirstCuePoint); - no quotes.
    Also, I don't use FLVPlayback - it has it's own methods and
    events. What I wrote pertains to the cases when NetSream and
    NetConnection are used stand alone.

  • 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);

  • Need .flv to pause on Cue Point usingActionScript 3

    I'm creating a presentaiton of a Google Earth flythru. At
    specific (cue) points I need the FLV to pause and then when the
    presenter pushes a key (space bar) the FLV continues to play. I
    have a good understanding of the Event Listener process for AS 3.0
    but am not sure how to address the the action of the pausing once
    the flv reaches the cue point. Does anyone know of any good
    tutorials? Or any helpful insight?
    Thanks,
    Mike

    NetStream events have nothing to do with cue points.
    onCuePoint method belongs to NetStream client. So, you will need
    something like this:
    client.onCuePoint = pointListener;
    function pointListener (cuePoint:Object):void {
    trace(cuePoint.name + " " + cuePoint.time);
    In a nutshell NetStream events are fired when changes occur
    in video delivery (buffer, start, pause, etc.) - not video content.
    More information:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html
    As for your code, your syntax is not correct.
    You wrote: vid.addEventListener(NetStatusEvent.NET_STATUS,
    "myFirstCuePoint");
    If you listener function is myFirstCuePoint you need to
    write:
    vid.addEventListener(NetStatusEvent.NET_STATUS,
    myFirstCuePoint); - no quotes.
    Also, I don't use FLVPlayback - it has it's own methods and
    events. What I wrote pertains to the cases when NetSream and
    NetConnection are used stand alone.

  • [Q] Can I insert the cue point when recording an FLV via FMS2???

    Hi... :)
    I think this can be a simple yes/no question...
    Does anybody know if I can insert the cue point when
    recording an FLV via FMS2 via AS???
    Thanks... :)
    CyanBlue

    According with fms2 documentation, you can define cue points
    in an FLV file when you first encode the file, or when you import a
    video clip in the Flash authoring tool by using the Video Import
    wizard.
    The FMS2 only handles with cue points.... using the
    NetStream.onCuePoint event handler.

  • FLV and Event Cue Points

    Hi,
    I am streaming and flv file with numerous event cue points.
    When each cue point is reached I attach different movie clips. The
    problem is I need to add custom fast forward and rewind buttons to
    the video. I tried using netStream.seek(netStream.time +5) which
    works, but it skips over the event cue points. So when you stop
    fast forwarding the wrong movie clip is attached.
    Is there another way to fast forward the video and still have
    the event cue points recognized?
    Thanks,
    Caroline

    if (index="introductionText")
    I think you need double =, like this:
    if (index=="introductionText")
    -rich

  • Help - Using Cue Points to Play Movie Clips

    I have a FLV, into which I have placed about 8 cue points. I
    want a movie clip to play - (each movie clip is simply a snippet of
    supporting text for the video) - when a cue point is "hit". I am
    really quite baffled by most of the documentation that I have read
    so far.
    How can I do this? Many, many thanks for any support you can
    give.
    tommy53

    You can build out a menu by reading the cuePoints array in
    the NetStream.onMetadata handler, or by using the MetadataEvent
    with the FLVPlayback component (AS3). The simple thing for me to
    say is to refer to Chapter 9 of my new Flash Video book. :) (see
    link in my signature below.)

  • Using cue points to trigger events on the main timeline...

    Hi--
    I have successfully placed an flv (video) file (progressive
    download) on the main timeline of my movie with controls to play
    and pause (Flash 8 Professional). So far, so good!
    NOW TWO PROBLEMS: Does anyone know how to set it up so that
    when a specific cue point is reached in the video, it triggers an
    action on the main timeline? In this case, once the video is over,
    I want the main timeline to gotoAndPlay frame 3. Specific script to
    do this would be great!
    The other action I'd like to happen is that when the video
    begins, it targets a scrolling text mc ("text") in the main
    timeline and tells it to gotoAndPlay frame 2.
    Any advice would be GREATLY appreciated!!! Many
    thanks!!!

    I usually start off solving problems with the livedocs, as I
    recommend for anyone. The following link will take you to the
    NetStream.onCuePoint handler. This is what you need.
    http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context= LiveDocs_Parts&file=00002561.html
    You can have this code on the main timeline. When the
    cuepoint is hit, it will invoke this event handler and inside is
    where your gotoAndPlay( ) should go.
    Your other question about the text will get activated by the
    same handler. Just have a conditional statement (if, switch, etc.)
    to differentiate between the two events. The text itself can be
    mask inside a movieclip.
    Does this help?

  • Using Cue Points to advance to next scene

    I'm pretty new to AS3. I'm a designer trying to do it myself.
    What I'm trying to do is use a cue point at the end of my FLV (which is loaded using ui loader in my flvSWF) to go to the next scene in my mainSWF file.
    here's the code I'm using in my flvSWF:
    import fl.video.VideoEvent;
    import fl.video.MetadataEvent;
    IntroMovie.addEventListener(MetadataEvent.CUE_POINT, cp_listener); 
    function cp_listener(eventObject:MetadataEvent):void { 
    trace("Elapsed time in seconds: " + IntroMovie.playheadTime); 
    trace("Cue point name is: " + eventObject.info.name); 
    trace("Cue point type is: " + eventObject.info.type); 
    if (eventObject.info.name == "CueNextScene") {
    this.gotoAndPlay("desk");
    But of course it does not work. 
    A.  my traces don't show up. 
    B. Am I suppose to use this code in my mainSWF instead of the flvSWF
    C. An FYI  the IntroMovie is one of 4 random movies that gets played for the intro in mainSWF. The random script works fine.

    You can build out a menu by reading the cuePoints array in
    the NetStream.onMetadata handler, or by using the MetadataEvent
    with the FLVPlayback component (AS3). The simple thing for me to
    say is to refer to Chapter 9 of my new Flash Video book. :) (see
    link in my signature below.)

  • Using cue points to acrivate movie clips

    I'm trying to write a simple piece of ActionScript that I can
    adapt and re-use easily. (I'm not very good at programming and I've
    been finding the "help" information very confusing.) I've devised
    quite an elegant solution, if only I could get it to work!.
    I'm using a single frame loop with an onEnterFrame
    construction that deletes itself when the flv has finished playing.
    I've set up a movie clip with various start points for animations
    to be activated at cue points. I'm testing for the cue points in
    the same frame, storing previous cue point names so that each cue
    point triggers the corresponding animation once only. I know the
    main logic works because I've tested it with trace statements to
    prove that the cue points are actually being reached. The problem
    is that the goToAndPlay instructions don't seem to activate the
    movie clip as intended.
    My best guess is that the stop action on the self-looping
    frame is also stopping the movie clip as soon as it starts. Even if
    that is true, I don't know how to solve the problem. And I'm sure
    one of you much more clever people will know better. Here's the
    code. Any suggestions?

    You can build out a menu by reading the cuePoints array in
    the NetStream.onMetadata handler, or by using the MetadataEvent
    with the FLVPlayback component (AS3). The simple thing for me to
    say is to refer to Chapter 9 of my new Flash Video book. :) (see
    link in my signature below.)

Maybe you are looking for

  • No progress compressing

    Ive just imported an mp4 video file into compressor so i can make a dvd out oif it. Ive set the quality for dvd best quality 90 minutes and set my destination. I clicked submit yesterday and the status is still saying"preparing". Should a film of 1 h

  • How can I transfer this video from a disc to Final Cut Express?

    There's an empty Audio_TS folder and a Video_TS folder containing VOB, BUP, and IFO files. Please keep in mind, I don't know what any of that means :3 I tried to use Quicktime but it said they're not video files... but it can play on the dvd player a

  • How to get twain to work with PS CS5 on Mac OS 10.6.8?

    I have CS5 Design Standard on a Macbook Pro OS 10.6.8 . I tried downloading the twain plugin and dragging into applications/ PSCS5/plug-ins/import-export then relaunching as instructed on Adobe website. Nothing. The plug-in is there but no twain inte

  • Just upgraded and it says join a network? but nothing is working!

    I Just upgraded my phone. Now it says join a network.  But nothing is working. What can I do?

  • Problem after updating security 2005-002.

    Have an apple mac air .The problem started after updating the security 2005-002 version 1.0 . I cannot update any other app and when i have to put my apple ID a message pops up saying STATUS_CODE_ERROR. What should i do ? can i delete or undo the sec