Cue Point Names

How do I listen/respond to a specifice cue point by name in AS3?
I have this listener which runs a function as soon as a cue point is reached, but I can't figure out how to run different functions for different cue points.
center_flv.addEventListener(MetadataEvent.CUE_POINT, interactive);

the following will show you the properties you can use:
center_flv.addEventListener(MetadataEvent.CUE_POINT, interactive);
function interactive(e:MetadataEvent){
for(var s:String in e.info){
trace(s,e.info[s]);

Similar Messages

  • Premiere CS3: How can you encode xml cue point data in the chapter section of a marker for FlashVid?

    Hi there,
    I'm a total newb to this forum, so hello adobe premiere community! I'm perplexed by Adobes documentation on Premiere (and I'm sure I'm not the first ) anyway on the live documents page below:
    http://livedocs.adobe.com/en_US/PremierePro/3.0/help.html?content=WS9390BED7-9466-46ea-A0E A-3240F1AFC36C.html
    it states that:
    “The cue point data in the Chapter field of a sequence marker in Adobe Premiere Pro will be encoded as Flash XML. For the XML protocol required, see Flash Help.”
    Which is great…except this information doesn’t exist seemingly in either the Premiere documentation or Flash either for that matter, but as I’m interested in working with the chapter/marker area in Premiere – should I really be told to go off and search the documentation for another application, probably not!  What would have been useful would have been a code snippet saying you do it like this, but of course, that would make things too easy!
    Basically, I understand that in After FX you can add Flash marker information specifically for interpretation when exporting to Flash Video (i.e. name, type and parameters etc) and it suggests that you can do the same above in Premiere CS3 using some kind of concatenated string in the chapter area…it just doesn’t tell you how anywhere seemingly – WHY ADOBE!
    Currently when I export markers as cue points based on the advice in the page above, anything I put in the chapter section to force Premiere to create a cue point is converted to a string, which becomes the cue point ‘name’.
    This cue point name is then automatically appended to the ‘time’ the marker was inserted at and is always encoded as type ‘navigation’, with no obvious means of adding ‘parameters’ into the equation.
    So (finally) does anyone know if you can insert this information into the chapter area for correct interpretation by flash (i.e. thus allowing you to choose between either 'navigation' or 'event' types, and pass as many 'parameters' as you wish etc) or are you just limited to supplying a name, and it being automatically set to the navigation type with no parameters?
    I’m sorry for this long essay but at least the issue is well defined for you to answer, honestly any help you can provide what so ever would really be most appreciated!
    Best regards,
    Kat
    PS – I have utterly no knowledge of XML either just in case you were wondering – and my only interest in XML is getting this basic information encoded into the FLV file from Premiere Pro CS3! Please help, pretty please with daisy’s!!!

    Hi dradeke,
    Thanks for your reply, which is indeed useful as clearly Adobe have made this task easier and less obscure in CS4 by adding simple interface functionality, however I'm stuck with using CS3 for the moment.  Its not majorly a problem as the video material in question can be exported uncompressed then setup with cue points using the Flash encoder as an alternative (i.e. or even After FX CS3 also) which both provide the same features as Premiere CS4 seemingly. It is just that it would be much easier to be able to drop in simple markers whilst working with Premiere CS3, as this is what we are going to be using primarily, I just wondered if anyone knew how to invoke this in CS3 - its possible you can't, the documentation is vague at best!
    However I really appreciate your response and help, thanks 

  • Using audio cue points in a flash movie

    Hello all,
    I am trying to put together some simple videos for my kids to
    play on their ipods to study on the way to school.
    I put together a real simple slide show, and prepared an
    audio track. I polished it up in soundbooth, and included some
    markers in the audio track. I was hoping to find a way to pause the
    slideshow, until the marker is reached in the audio track. I have
    done this before in director, but just cannot seem to figure it out
    in flash cs3. Any help you can give would be appreciated.
    Thanks, BobR

    Hi,
    The following AS2 code may help you
    stop();
    var listenerObject:Object = new Object();
    listenerObject.ready = function(eventObject:Object):Void {
    <your flv playback instance name>.addEventListener("ready", listenerObject);
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    <your button instance name>.onRelease = function () {
    playback.seekToNavCuePoint("<your cue point name>");
    <your flv playback instance name>.addEventListener("cuePoint", listenerObject);
    \\replace all the placeholder things including the < >
    Also just take a look at the description at http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00003003.html for more details
    Thanks!
    ps: pls mark this post as answered if this is of help to you

  • Cue Point Navigation

    I will preface this all by saying I am very new to the whole
    idea of using code for anything (I have problems programming my
    watering system at home and it's got buttons) and I could sure use
    some help from people in the know.
    I'm working on an FLA that has 7 talking head videos
    w/PowerPoint slides as pngs from a medical conference.
    I'm trying to get slides to synchronize with embedded
    navigation cue points in the video. All the code I entered so far
    was based on the Adobe article "Controlling Flash video with
    FLVPlayback programming-Cue point event handling" and I used the
    code example provided. When I exported the movie all I get is a
    flickering flv icon on the screen and the following error message:
    line 1 1046: Type was not found or was not a compile-time
    constant: MetadataEvent.
    Attach Code
    function cuePointHandler(event:MetadataEvent):void
    trace("name = "+event.info.name);
    trace("time = "+event.info.time);
    // Go to a frame label with the cue point name
    gotoAndStop(event.info.name);
    flvControl.addEventListener(MetadataEvent.CUE_POINT,
    cuePointHandler)

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

  • Cue Point in FLV Help

    I have a progresive flv with an instance name of myVid which
    is already on the stage and set to autoplay via the component
    parameters tab. When the video plays and gets to a cue point I want
    the flv to pause. The cue point names (embedded when I used Flash
    Video Encoder) are cp01, cp02, and cp03. The video doens't stop on
    the specified cue point and instead just keeps playing. Can anyone
    help me with my code? Is there a better way to do it? Here is what
    I have so far:

    necie,
    > The video doens't stop on the specified cue point and
    instead
    > just keeps playing. Can anyone help me with my code?
    This is definitely the best Adobe forum for your question,
    but since you
    happened to post in the General forum first, I answered your
    thread there.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Using cue points in Flash CS5 to trigger actions

    Hi there,
    I'm looking to use a cue point in a video to trigger an action, in this case go to and play at a movie clip on the stage. Is this possible. My setup is as follows:
    I've a video on stage with the instance name 'vid', with a cue point 'lap1' (an actionscript cue point created directly in Flash using the properties panel). When the video reaches cue point 'lap1', I want it to go to and play frame 2 of a movie clip I've got on stage with the instance name 'cueMovie'.
    Any help would be great; I've looked online for tutorials but no joy.
    Cheers,
    Conor

    1  stop();
    2  varListenerObject:Object = new Object();
    3  listenerObject.cuePoint = function(eventObject:Object):Void{
    4  trace(Cue Point:"+ eventObject.info.name);
    5  trace("event:"+eventObject.info.type);
    6  if(eventObject.info.name=="cue Point 1"){
    7  gotoAndStop(2);
    8  }
    9
    10 }
    if your cue point is named cue point 1 then you can leave script as it is if not you have to insert your cue point name> Also it has to be an event type of cue point to work.

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

  • Cue point question

    Hello all,
    I have a question abou cue points. I have a script, see below. In that script I define some cue points. Now I want to define a action for each cue point seperate.
    The script:
    // Requires an FLVPlayback instance called my_FLVPlybk on Stage
    import fl.video.*;
    import fl.video.MetadataEvent;
    my_FLVPlybk.source = "1.flv"
    var cuePt:Object = new Object(); //create cue point object
    cuePt.time = 2.02;
    cuePt.name = "ASpt1";
    cuePt.type = "actionscript";
    my_FLVPlybk.addASCuePoint(cuePt);//add AS cue point
    // add 2nd AS cue point using time and name parameters
    my_FLVPlybk.addASCuePoint(5, "ASpt2");
    my_FLVPlybk.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
    function cp_listener(eventObject:MetadataEvent):void {
            var request:URLRequest = new URLRequest("dummy.swf");
            var loader:Loader = new Loader()
            loader.load(request);
            addChild(loader);
            new URLLoader()
            trace("Elapsed time in seconds: " + my_FLVPlybk.playheadTime);
            trace("Cue point name is: " + eventObject.info.name);
            trace("Cue point type is: " + eventObject.info.type);
    I manage to load a dummy movie at the cuepoint, but that is for all cuepoints. I want to set dummy.swf for ASpt1 and something.swf for ASpt2 and so on.
    Can someone help me?
    Thanks

    Ok starting to get the hang of this, in my actionscript are the following:
    btn_start.visible=false
    import fl.video.MetadataEvent;
    MainVid.addEventListener(MetadataEvent.CUE_POINT, Pause);
    function Pause(event:MetadataEvent):void
        trace(event.info.name);
        MainVid.stop();
    import fl.video.MetadataEvent;
    MainVid.addEventListener(MetadataEvent.CUE_POINT,BtnStart);
    function BtnStart(event:MetadataEvent):void
        btn_start.visible=true
    import fl.video.MetadataEvent;
    MainVid.addEventListener(MetadataEvent.CUE_POINT,btnVisible);
    function btnVisible(event:MetadataEvent):void
        btn_start.visible=true
    btn_start.addEventListener(MouseEvent.CLICK, Resume);
    function Resume(event:MouseEvent):void
        MainVid.play();
    MainVid.addEventListener(MetadataEvent.CUE_POINT, Pause2);
    function Pause2(event:MetadataEvent):void
        trace(event.info.name);
        MainVid.stop();
    btn_start.addEventListener(MouseEvent.CLICK, Resume2);
    function Resume2(event:MouseEvent):void
        MainVid.play();
    MainVid.addEventListener(MetadataEvent.CUE_POINT, Pause3);
    function Pause3(event:MetadataEvent):void
        trace(event.info.name);
        MainVid.stop();
    I wanted after the Resume to have the button hide again and can't seem to do it.
    Also, I had saved the file, then opened again to see that the CuePoints are not in the Properties anymore.
    Is this normal?

  • Cue Point Trigger

    I have actionscript below that works perfectly to trigger cue
    points in the order they fall...
    BUT...., for the life of me I can't figure out how to make
    it trigger from a specific cue point name. I have EVENT cue point
    named SPRING. I need that to trigger the timeline to go to and stop
    on frame 20.
    ANY HELP is greatly appreciated. I have researched this and
    worked on it for two days now.
    playback_media.contentPath =
    "rtmp://flash20.audiovideoweb.com/ca70fls25122/_definst_/Bouquet_400.flv";
    var playback_mediaList:Object = new Object();
    var playback_mediaList:Object = new Object();
    playback_media.cuePoint = function(cues) {
    gotoAndStop(20);
    playback_media.addEventListener("cuepoint",playback_mediaList);

    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

  • Problems Using Cue points to Loop Video

    Ok, so I want to use cue points to navigate through video.  I want to start by simply looping the video from the end back to the beginning.  I keep getting an invalid seek error 1003.  Here is my code.  Any help would be much appreciated.  Thanks
    import fl.video.MetadataEvent;
    Movie.addEventListener(MetadataEvent.CUE_POINT, loopFunction);
    function loopFunction(e:MetadataEvent):void
        if (e.info.name == "end1")
            Movie.seekToNavCuePoint("beginning1");
            Movie.play();

    At least you are getting notified even if the seek doesn't work.
    A brief workaround could be to iterate over the cue points you detect in metadata, assigning each cue point name and time in an object. Once you hit the cue point you desire, see if the object has the time value and seek() to the time for that cue point rather than seeking for it by name.
    e.g. (written briefly, you get the idea):
    // object to hold time values
    var cuePointArr:Object = new Object();
    function onMetaData(infoObject:Object):void
        var cueIndex:String;
        for (cueIndex in infoObject.cuePoints)
            trace("Adding cue name[" + infoObject.cuePoints[cueIndex].name + "] at time[" + infoObject.cuePoints[cueIndex].time + "]");
                        // store as name = time
                        cuePointArr[infoObject.cuePoints[cueIndex].name] = infoObject.cuePoints[cueIndex].time;
    function loopFunction(e:MetadataEvent):void
              // correct cue point and has a value in cuePointArr?
        if ((e.info.name == "end1")&&(curPointArr[e.info.name] != null))
                        // seek to time value
            Movie.seek(Number(cuePointArr[e.info.name]));
            Movie.play();
    Moving 900mph here so forgive any typos but turning it into a normal seek based on the time value should work for now.

  • Load a set of cue points based on which flv is currently loaded

    Hello there, I want to load a set of cuepoints into my flv player, I have 5 flvs and I want a particular set of cues to load depending on which flv is currently playing, any help would be massively appreciated.
    cheers
    Dave

    heres my code...
    stop ();
    import fl.video.*;
    import flash.events.*;
    import flash.display.Stage;
    // Define the variable for the video component instance name
    var flvControl = display;
    // Create the video playlist
    var videoList = ["video/1.flv","video/2.flv","video/3.flv","video/4.flv","video/5.flv"];
    var videoIndex = 0;
    var loopAtEnd = false;
    // Handle the video completion (load the next video)
    function completeHandler(event:VideoEvent):void
       // Get next item in list
       videoIndex++;
       trace (flvControl.source)
       // Validate index
       if(
        videoIndex == videoList.length ){
        if( loopAtEnd ){
        videoIndex = 0;
        }else{
        return;
       // Load the next video
       flvControl.source = videoList[videoIndex];
       trace (flvControl.source);
    flvControl.addEventListener(VideoEvent.COMPLETE, completeHandler);
    // Set the default video (Start)
    flvControl.source = videoList[0];
    //BUTTON CODE
    function buttonHandler(e:MouseEvent):void
        switch (e.target)
            case introduction_btn:
                videoIndex = 0;
                flvControl.source=videoList[videoIndex];
                display.addASCuePoint(1, "I1");
                display.addASCuePoint(16, "I2");
                display.addASCuePoint(34, "I3");
                display.addASCuePoint(60, "I4");
                display.addASCuePoint(80, "I5");
                display.addASCuePoint(95, "I6");
                display.addASCuePoint(118, "I7");
                display.addASCuePoint(138, "I8");
                display.addASCuePoint(165, "I9");
                break;
            case practiceMatters_btn:
                videoIndex = 1;
                flvControl.source=videoList[videoIndex];
                display.addASCuePoint(3, "P bvt1");
                display.addASCuePoint(28, "P bvt2");
                display.addASCuePoint(50, "P bvt3");
                display.addASCuePoint(105, "P bvt4");
                display.addASCuePoint(150, "P bvt5");
                display.addASCuePoint(194, "P bvt6");
                display.addASCuePoint(218, "P vcp1");
                display.addASCuePoint(277, "P vcp2");
                display.addASCuePoint(302, "P cjsss1");
                display.addASCuePoint(343, "P cjsss2");
                display.addASCuePoint(377, "P cjsss3");
                display.addASCuePoint(427, "P cjsss4");
                display.addASCuePoint(450, "P cjsss5");
                display.addASCuePoint(490, "P cjsss6");
                display.addASCuePoint(562, "P cjsss7");
                display.addASCuePoint(602, "P cjsss8");
                display.addASCuePoint(652, "P cjsss9");
                display.addASCuePoint(680, "P end");
                break;
            case legislation_btn:
                videoIndex = 2;
                flvControl.source=videoList[videoIndex];
                display.addASCuePoint(1, "L intro");
                display.addASCuePoint(38, "L cjia1");
                display.addASCuePoint(73, "L cjia2");
                display.addASCuePoint(136, "L cjia3");
                display.addASCuePoint(191, "L cjia4");
                display.addASCuePoint(325, "L cjia5");
                display.addASCuePoint(405, "L cjia6");
                display.addASCuePoint(460, "L cjia7");
                display.addASCuePoint(524, "L cjia8");
                display.addASCuePoint(665, "L cjia9");
                display.addASCuePoint(704, "L cjia10");
                display.addASCuePoint(870, "L cjia11");
                display.addASCuePoint(910, "L summary");
                display.addASCuePoint(935, "L END");
            break;
            case judgements_btn:
                videoIndex = 3;
                flvControl.source=videoList[videoIndex];
                display.addASCuePoint(1, "J1");
                display.addASCuePoint(37, "J2");
                display.addASCuePoint(70, "J3");
                display.addASCuePoint(139, "J4");
                display.addASCuePoint(170, "J5");
                display.addASCuePoint(220, "J6");
                display.addASCuePoint(306, "J7");
                display.addASCuePoint(345, "J8");
                display.addASCuePoint(410, "J9");
                display.addASCuePoint(455, "J10");
                display.addASCuePoint(508, "J11");
                display.addASCuePoint(585, "J12");
                display.addASCuePoint(632, "J13");
                display.addASCuePoint(672, "J14");
                display.addASCuePoint(694, "J15");
                display.addASCuePoint(806, "J16");
                display.addASCuePoint(806, "J end");
            break;
            case end_btn:
                videoIndex = 4;
                flvControl.source=videoList[videoIndex];
            break;
    addEventListener(MouseEvent.CLICK,buttonHandler);
                if
                (videoIndex == 1)
                {display.addASCuePoint(3, "P bvt1")}
                else   
                if
                (videoIndex == 0)
                display.addASCuePoint(1, "I1");
                display.addASCuePoint(16, "I2");
                display.addASCuePoint(34, "I3");
                display.addASCuePoint(60, "I4");
                display.addASCuePoint(80, "I5");
                display.addASCuePoint(95, "I6");
                display.addASCuePoint(118, "I7");
                display.addASCuePoint(138, "I8");
                display.addASCuePoint(165, "I9");
    function synchVideoToInterace( cueName:String ):void
        // Play if needed
        if(!display.isRTMP && !display.playing ){
            display.play();
        // Show associated content on screens or labeled frames
        gotoAndStop( cueName );
    function cuePointHandler( evt:MetadataEvent ):void
        // Get the cue name from the event object
        synchVideoToInterace( evt.info.name );
    display.addEventListener(MetadataEvent.CUE_POINT,cuePointHandler);
    display.addEventListener(Event.COMPLETE, completeListener);
    display.addEventListener(MetadataEvent.CUE_POINT, cuePointListener);
    function cuePointListener(event:MetadataEvent):void
        trace("Elapsed time in seconds: " + display.playheadTime);
        trace("Cue point name is: " + event.info.name);
        trace("Cue point type is: " + event.info.type);
    function completeListener(event:Event):void
        trace (flvControl.source=videoList[videoIndex]);
    thanks for looking at this for me

  • Flash CS4, Using ActionScript in Buttons to go to cue points in a FLV

    Hi.
    I'm pretty much a Flash novice, so i don't think this question is particularly hard, it's just something that's vexing me for a few days. I know it's possible based on all the literature I've  read, but I can't seem to get it done properly.
    Basically, I have a video file that I rendered in FLV with 5 navigation points called 1, 2, 3, 4, 5.
    What I want to do is use buttons to navigate to the five cue point in the flash movie. I think that this is possible using ActionScipt 2, but I don't know what to code in the script function.
    Any help would be very, very appreciated.
    Thanks,
    Javier

    Hi,
    The following AS2 code may help you
    stop();
    var listenerObject:Object = new Object();
    listenerObject.ready = function(eventObject:Object):Void {
    <your flv playback instance name>.addEventListener("ready", listenerObject);
    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    <your button instance name>.onRelease = function () {
    playback.seekToNavCuePoint("<your cue point name>");
    <your flv playback instance name>.addEventListener("cuePoint", listenerObject);
    \\replace all the placeholder things including the < >
    Also just take a look at the description at http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00003003.html for more details
    Thanks!
    ps: pls mark this post as answered if this is of help to you

  • Listening for cue points?

    I keep getting error messages and don't know why?
    I am trying to listen for cue point. What am I doing wrong?
    Also, do I really need to have the NET_STATUS listener attached to both the NetConnection and NetStream?
    Thanks a lot for any help!!!
    var myVideo:Video = new Video();
    addChild(myVideo);
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    myVideo.attachNetStream(ns);
    ns.play("myVid.flv");
    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
    ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
    ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
    ns.addEventListener(MetadataEvent.CUE_POINT, cuePointHandler);
    function cuePointHandler(infoObject:MetadataEvent):void
         trace("cuePoint from cuePointHandler");
         trace("Cue point name is: " + eventObject.info.name);
         trace("Cue point type is: " + eventObject.info.type);

    What error do you get?
    Yes, you should have NET_STATUS on both NetConnection and NetStream.
    Also I don't see that you assign client to anything - connection and stream's events/methods are invoked on client. Especially you need it for listening for cue points. So, at least you need a line:
    ns.client = this;
    I think you mix unmixable here. I believe MetadataEvent.CUE_POINT is dispatched by FLVPlayback class. You do not use it. To read cue points from the stream you need to provide onCuePoint method in your code (again, it will work ONLY if you point to the client):
    function onCuePoint (infoObject:Object):void {
         trace("cuePoint from cuePointHandler");
         trace("Cue point name is: " + eventObject.name);
         trace("Cue point type is: " + eventObject.info);
         trace("Cue point parameters Array is: " + eventObject.parameters);
    I would move NetStream instnatiation to a function that is called when NetConnection is successfull. From Adobe help:
    private function netStatusHandler(event:NetStatusEvent):void {
         switch (event.info.code) {
              case "NetConnection.Connect.Success":
                   connectStream();
              break;
              case "NetStream.Play.StreamNotFound":
                   trace("Stream not found: " + videoURL);
              break;
    private function connectStream():void {
         ns = new NetStream(connection);
         ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
         ns.client = new CustomClient();
         var video:Video = new Video();
         video.attachNetStream(ns);
         ns.play(videoURL);
         addChild(video);

  • 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.

Maybe you are looking for

  • Can't export to iTunes anymore

    Been using GB for about six months. Yesterday after finishing a song in GB, I told it to export to iTunes, and it tried...it finished up until the part where iTunes automatically opens and the file appears in iTunes. Instead of that happening, iTunes

  • Performance Problems with ITS

    HI Guru's, we have developed one Module Pool Application in ABAP. we want to use that application through ITS. IF we run the application in the normal system, the application works wee. even with ITS the performance is good in the normal system ( PC

  • To maintenance order to purchase order

    Hello, How could i convert my maintence order for me to create a purchase order to that same maintenance order? Thanks and Regards, Ryan

  • Can you batch save as pdf's to excel files

    I was wondering if there was a way of batch saving a number of PDF documents to EXCEL files so then we can collate and graph the data from there.

  • Can we do Dml statements on materialize views

    I want to know can we do Dml statements on materialize views .If yes, how