PDA

View Full Version : Video & Movieclip



uwf
November 14th, 2005, 06:04 PM
Help with Video and Movieclip. I want to play a 6:00 video using linkage and not embeded on the timeline and next to the video I want to play a movieclip at 1:30 and 2:00 of the movie. Is there a way to track the video time and tell it to play this movieclip 1:30 into the video at this x,y cordinate? Any help is appreciated.

v2ikematu
November 14th, 2005, 09:05 PM
whooo... had to read 3 times before i understood. and even now not completely. You can stream a FLV and you can add cue points to it. And in flash you can then use the NetStream's onStatus event handler to do someting on your cue points!

so in flash help look for:
NetConnection, NetStream

I actually could write you the whole code, but what's the point of it? you probably wouldn't learn anything. :wink:

uwf
November 15th, 2005, 04:24 PM
Thanks for the start. So I use the NetStream.time and got the movie playing with the time counting up. Can you help with displaying "movie_clip A" at 1:30-3:00 and displaying "movie_clip B" at 2:00-2:30? Thanks

var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("Stratigraphy2.flv");
//
stream_ns.onStatus = function(infoObject:Object) {
statusCode_txt.text = infoObject.code;
};

this.createTextField("time_txt", this.getNextHighestDepth(), 25, 150, 100, 22);
time_txt.text = "LOADING";

var time_interval:Number = setInterval(checkTime, 500, stream_ns);
function checkTime(my_ns:NetStream) {
var ns_seconds:Number = my_ns.time;
var minutes:Number = Math.floor(ns_seconds/60);
var seconds = Math.floor(ns_seconds%60);
if (seconds<10) {
seconds = "0"+seconds;
}
time_txt.text = minutes+":"+seconds;
}


whooo... had to read 3 times before i understood. and even now not completely. You can stream a FLV and you can add cue points to it. And in flash you can then use the NetStream's onStatus event handler to do someting on your cue points!

so in flash help look for:
NetConnection, NetStream

I actually could write you the whole code, but what's the point of it? you probably wouldn't learn anything. :wink: