Results 1 to 5 of 5
Thread: Cue Points: flv embedded
-
October 8th, 2007, 08:58 PM #1111Registered User
postsCue 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
-
October 8th, 2007, 11:06 PM #2111Registered User
postsDear 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.
-
April 2nd, 2008, 10:21 AM #3
can u giv me the code for tracing control cue points dynamically using actionscript,in which flv coming dnamically not embed one.?
-
April 2nd, 2008, 10:47 AM #435Registered User
postscosta, 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!// Anything is possible, the impossible just takes longer!
-
April 3rd, 2009, 09:37 AM #51Registered User
postsI'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);

Reply With Quote

Bookmarks