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

Similar Messages

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

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

  • Use cue points to automatically pause flv

    I have a video that I would like to make play in steps. I
    already have a custom flv playbar, so I would like to use cue
    points to control it
    Thanks in advance

    i am looking for this same answer. i am not a pro at flash
    but good enough to make my way around. Here is what I have done so
    far....
    using components i dragged the FLVPlayBack onto stage, i set
    the source of the playback to my flv. as of right now, 'cuepoints'
    is set to none. i'd like to be able to set in about 5 cue points
    and have them auto pause each time they come up. any help would be
    appreciated!
    thanks,
    travis

  • Controlling external information using cue points

    Hello,
    I am trying to change information on my site using cue points in my video.  My video is in a flash quiz and I am trying to change my objects such as an ad or photo with these cue points.  In otherwords, when a video begins, or when a cue point is reached the photo outside the video would change.  I am currently using cue points to go to the next frame after the video completes, but I don't know how to make it change things outside the video.  Thank you for your help.

    I'm sure there is more than one way to skin this cat, but here is what I use with NetStream video to load other .swfs (could be photos or other videos) at certain points in the main video:
    ns.onCuePoint = function(evt:Object){
        trace(evt.name);
        trace(evt.time);
        if(evt.name == "play_vid1") {
            trace("YO!Loading wide_holder!");
            wide_holder.loadMovie("rm/images/black_bear.swf");
        if(evt.name == "play_vid2") {
      trace("YO!Loading standard_holder!");
            standard_holder.loadMovie("rm/images/sqis.swf");
    in this case using an "event" cue point object embedding at certain times in the video.
    Lots of info on the Web, here is just one:
    http://www.communitymx.com/content/article.cfm?cid=124DB
    Best wishes,
    Adninjastrator

  • Using cue points to change a text box

    Ok I asked a simlar question before but I am still having trouble getting it to work.
    I have a video with 11 Cue points and at each cuepint I want the Typebox to change it text at each cue point.
    When the video is playing I want a the textbox to change the text when cue point 1 is reached. This is the code I am using. But every always goes straight to the whatever the last functions text and skips all the other before it. Its bassically this code repeated with difffernt function name and string.
    import fl.video.MetadataEvent;
    flvplayer.addEventListener(MetadataEvent.CUE_POINT,section2Cue);
    function section2Cue(event:MetadataEvent):void{
        for(var String = "section2" in event.info){
            typebox.text = "Hello";                        }
    So basically I want to tell flash, when CuePoint1 is reached text = "hello world" and when CuePoint2 is reached I want the text ="Hello Again". I don't know what I am doing wrong or what is the best way to tell flash how to do this

    Ok, I tryed that code Basically I want to call upon each cue point individually and have an event for each one. So how i tell it to display this only when Cuepoint1 is reach and display that only when Cuepoint2 is reached.  What data would help ?
    Most of my code is just buttons to reach each cuepoint within the video. I got that to work fine.
    I'll supply it anyways
    import flash.events.MouseEvent;
    // Assign a new skin to my FLVPlayback instance using ActionScript
    flvplayer.skin = "player.swf";
    flvplayer.fullScreenTakeOver = false;
    //select section menu button
    selectBtn.addEventListener(MouseEvent.CLICK, openMenu);
              function openMenu(event:MouseEvent): void{
                        trace("working");
                        selectMenu.gotoAndPlay(2);
              selectMenu.closeX.addEventListener(MouseEvent.CLICK, closeMenu);
                        function closeMenu(event:MouseEvent): void{
                                  trace("closing");
                                  selectMenu.gotoAndPlay(11);
              //Cuepoint Buttons
    selectMenu.sec1.addEventListener(MouseEvent.CLICK, section1Button);
    function section1Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section1");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Orion Health EMR Lite Overview";
    selectMenu.sec2.addEventListener(MouseEvent.CLICK, section2Button);
    function section2Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section2");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Adopt Electrionic Patients Records Easily";
              selectMenu.sec3.addEventListener(MouseEvent.CLICK, section3Button);
    function section3Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section3");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Introducing Orion Health EMR Lite";
                        selectMenu.sec4.addEventListener(MouseEvent.CLICK, section4Button);
    function section4Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section4");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Meet Mr. Smith - Patient Registration and Intake";
    selectMenu.sec5.addEventListener(MouseEvent.CLICK, section5Button);
    function section5Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section5");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Orion Health EMR Lite in the Exam Room - Clicnical Documentation and Orion Health HIE Integration";
    selectMenu.sec6.addEventListener(MouseEvent.CLICK, section6Button);
    function section6Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section6");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Working with Orion Health EMR Lite - Documentation";
    selectMenu.sec7.addEventListener(MouseEvent.CLICK, section7Button);
    function section7Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section7");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Order Entry in Orion Health EMR Lite";
    selectMenu.sec8.addEventListener(MouseEvent.CLICK, section8Button);
    function section8Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section8");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "ePrescribing";
    selectMenu.sec9.addEventListener(MouseEvent.CLICK, section9Button);
    function section9Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section9");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "ePrescribing";
    selectMenu.sec10.addEventListener(MouseEvent.CLICK, section10Button);
    function section10Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section10");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Quality and Utilization Reporting";
    selectMenu.sec11.addEventListener(MouseEvent.CLICK, section11Button);
    function section11Button(event:MouseEvent):void
              // Replace video_instance_name with the instance name of the video component.
              // Replace "Cue Point 1" with the name of the cue point to seek to.
              var cuePointInstance:Object = flvplayer.findCuePoint("section11");
               flvplayer.seek(cuePointInstance.time);
               typebox.text = "Summary";
    As for data? This is all I know about my CuePoints
    Would the best way to acheive changing type is to change the way my movie clips are set up? Instead of telling it within the actionscript maybe telling it to go to next frame within a movieclip with the content? I don't know exactly how to word what I am trying to acheive but I'm trying!
    thanks!

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

  • Play different cue point in a movie

    I need to have an interface that runs several movies with cue points.
    In the interface I need to have many buttons. Movies can be different with different cue points.
    The first button should perform the first part of the movie (cue point from "a" to "b"), the second button must perform the second part of the movie (cue point from "b" to "c") and so on.
    How I must set the script and wich objects is better to use.
    Thanks.

    It seems you're adding the MP3 as a legacy media object, which is strongly discouraged (and impossible as of Acrobat X).
    MP3 files don't support genuine "cue points", but with Acrobat 9+ Rich Media annotations you can easily set a button to play a file from a specified offset time (in seconds) - by choosing a button action of "Multimedia Operation (Acrobat 9 and later)", then "Seek to time", and entering the offset in seconds from the start of the track in the bottom field of the dialog.
    With legacy media it's possible to do a similar thing with JavaScript, by entering a settings:startAt value in the argument object passed to media.openPlayer(), though this is not documented in the latest SDK and can't be used when authoring in Acrobat X, it's explained in the SDK for version 9. For example this starts playback 2.5 seconds in, provided the external player supports that operation:
    var args = { settings: { startAt: 2.5 } };
    app.media.openPlayer(args);
    Remove the existing script on your button and paste in the above code, changing the value as required. This assumes only one media object is present, if your existing code is more complex you will need to edit in the extra settings obbject by hand. With Rich Media, it's all done for you and there's no scripting involved.

  • How do I use a variable to set movie clip properties?

    I'm building a simple contact page that allows users to
    select a city from a comboBox. I'd like to pass the selected
    comboBox data through a variable that controls a movie clip with
    the same name. (already on the stage)
    locationListener.change = function (loc_obj:Object) {
    var loc_mc = loc_obj.target.selectedItem.data;
    loc_mc._visible = true;
    So far this hasn't worked. I've tested hardcoding the movie
    clip instance name (Atlanta._visible = true) and it works, but I
    can't figure out why using the variable loc_mc won't trigger
    interaction with the movie clip.
    Something simple, I assume. Thanks in advance for any
    help.

    clbeech:
    I tried using your suggestion, but for some reason it doesn't
    recognize it as naming the movie clip instance. I traced the
    variable and confirmed that the correct value (Atlanta) is being
    passed.
    I assume this is because the variable is not declared as a
    MovieClip, but I can't figure out how to convert it inside the
    function.

  • Final Cut Pro to Flash  -- Inserting and Using Cue Points

    I want to export a flash video using File - Export - Using Quick Time Conversion and selecting Flash. Under options for Flash, I see something about "Cue Points".
    My assumption is that these would be points that you can insert that are similar to chapter markers and that you could have the Flash player on a web page jump back and forth between them.
    Does anyone know of any documentation on inserting these points in Final Cut export? I couldn't figure it out. It looks like you give them a name and a timecode. I could not enter the timecode.
    How about over on the player side? I assume some sort ActionScript in Flash is required. Has anyone seen a simple example/tutorial of these capabilities?

    Apart from disabling time machine, iCal and any other programs or applications from taking focus. Time machine and software updates can certainly be told not to try as far as I recall.

  • How do you add cue points to a MOV file that Director 12 can read?

    I have just downloaded the Trial of Director 12 - and unless I can add cue points to video that it can interpret - I am not going to be able to achieve what I need to.  I've spent the last day and a half looking over the scant documentation provided by Adobe, and anything else I could find online - but the only answers that came anywhere near were for old versions using discontinued xtras.
    Please can anyone help? - I am using Windows 7 64 bit - CS6.
    Thanks in advance. :-)

    Probably too late for your project but...
    You can do this by using 3 sprites in addition to the SWF. In this example, I've named them "videoPlay", "videoRewind, and "videoStop". The SWF in this case was named "video."
    Apply this script to each of the 3 sprites.
    property mySprite
    on beginSprite me
      mySprite = sprite(me.spriteNum)
    end
    on mouseUp me
      case mySprite.name of 
        "videoPlay":
          sprite("video").play()
        "videoStop":
          sprite("video").stop()
        "videoRewind":
          sprite("video").stop()
          sprite("video").rewind()
      end case
    end

  • Can I change the registration point of a movie clip?

    I'm loading a movie clip dynamically and its registration
    point defaults to top-left corner. I need to change it to the
    center, is this possible? if so, how?
    Thank you

    Thank you. I tried that and it didn't work too. Please check
    this code:
    loader.loadClip(_global.image_url+this["image1"], image1);
    DynamicRegistration.initialize(image1);
    image1.setRegistration( 20, 20);
    What is wrong with it?

  • 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 Navigate an FLV

    I am wanting to make a Scene selection menu. I have loaded
    and FLV and put cue points in at the desired times. I am having
    trouble writing the actionscript so that by pressing a button the
    movie will skip to a desired cue point

    sorry wrong section

Maybe you are looking for

  • Problem: Selecting 2 individual pages from a 28page doc to print as a a spread...

    I have been using InDesign today to print off a 28page booklet. I have my document setup per screen grab 1 attached. As I need to print one sheet at a time (in order to turn over to print next spread), I need to select pages in particular that I want

  • Airport express for airplay only, not extending network

    I have just bought an airport extreme and airport express. The extreme is plugged into modem, and the express is in my living room, plugged into some older speakers.  The point of the express is to airplay-enable these speakers, not to extend the net

  • Camera for mac mini

    I am looking for a camera that will work with Photo Booth on a Mac Mini, OS X 10.8.2, 2.5 GHz i5, 4GB.  I have the IceCam2, but that does not work with moving backgrounds (e.g., rollercoaster).

  • Quality in Pro Training Series

    I'm working with

  • AE2014 does not recognize Quadro 4200  with Tesla K20.

    Hello. AE2014 does not recognize Quadro 4200  with Tesla K20. As I can see in this datasheet System requirements | After Effects, theese devices are not listed as capable. Is any chance to get it work? Should I install a special Nvidia driver or do s