Hey,
Im building a page with flash video. Heres the code i got so far.
function loadvideo() {
my_nc = new NetConnection();
my_nc.connect(null);
my_ns = new NetStream(my_nc);
videoloader.my_video.attachVideo(my_ns);
my_ns.play(_root.media_path add _root.ShowID add “/defaultvideo.flv”);
}
function stopvideo() {
trace(“video stopped”);
my_ns.close();
}
function pausevideo() {
trace(“video pause/play”);
my_ns.pause([pauseResume]);
}
This code works fine for loading and pausing and stopping the video.
What i need to do is trigger something to happen when the video is complete. I searched macromedias help and tried this…
my_ns.onStatus.NetStream.Play.Stop = function() {
this.videoloader.blackfade.play();
};
But it didnt do anything. How can i run a function automatically when the video ends?
Please help me out Ive been searching for days.