Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 5 of 5

Thread: Cue Points: flv embedded

  1. #1
    111
    posts
    Registered User

    Cue Points: flv embedded

    Dear all,

    Could you tell me where I can find a tutorial about using cue points?

    I got a video (flv) embedded into my timeline. I already added some cue points using Flash video encoder and now I want to trigger the cue points. According to Flash help I have to use NetStream.onCuePoint but I do not have idea how to use it.

    I will appreciate your help.

    Thanks

    PD: I am using Flash CS3 not Flex

  2. #2
    111
    posts
    Registered User
    Dear all,

    I found this tutorial that helped me to control cue points in a embedded video. Maybe it could be useful for you too:

    Tutorial

    And this is the code I used

    HTML Code:
    import fl.video.MetadataEvent;
    
    video_component.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
    
    function cp_listener(eventObject:MetadataEvent):void {
            trace("Elapsed time in seconds: " + video_component.playheadTime);
            trace("Cue point name is: " + eventObject.info.name);
            trace("Cue point type is: " + eventObject.info.type);
    }
    Last edited by costa; October 10th, 2007 at 05:23 PM.

  3. #3
    neeraj8585's Avatar
    54
    posts
    Neeraj (Flash developer)
    can u giv me the code for tracing control cue points dynamically using actionscript,in which flv coming dnamically not embed one.?

  4. #4
    costa, I don't think you will be able to get CuePoints working in an embedded video. There are generally 3 options for video in flash:

    1. As you mentioned in your first post the help says NetStream.onCuePoint so one option is to use the NetStream class and load your video file externally.

    2. You could use the FLVPlayback component that is in flash to load your video file externally.

    3. Embeded video is EMBEDED to your timeline, so why do you need to add cue points? you can just add keyframes along the timeline of your video and put some ActionScript calls there.

    Hope this helps, if you are embedding the video, just add the code in an actions layer, although if the video is embedded it may be HUGE depending on the size of the video. It may make sense to use one of the other two methods, primarily NetStream!

  5. #5
    1
    posts
    Registered User
    I'm using this "simple" actionscript to add cuepoint to a flv video to trigger some actionsript.
    (your imported flv video is "flvmovie"


    flvmovie.addASCuePoint(2, "cue1");
    flvmovie.addASCuePoint(4, "cue2");
    flvmovie.addASCuePoint(6, "cue3");


    var listenerObject:Object = new Object();
    listenerObject.cuePoint = function(eventObject:Object):Void {
    if (eventObject.info.name == "cue1") {
    _level0.vierkant.SETX = 0;//some action
    }
    if (eventObject.info.name == "cue2") {
    _level0.vierkant.SETX = 100;
    }
    trace("Elapsed time in seconds: "+flvmovie.playheadTime);
    trace("Cue point name is: "+eventObject.info.name);
    };


    flvmovie.addEventListener("cuePoint", listenerObject);

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012