hi… i have problems again… Does anyone noe how to use NetStream() method?? i have use it in my action script as i need to stream a recorded FLV. However, i dun noe y when i set the BufferTime the user have to wait very long for the video to finish buffering b4 it play. Is there any way to preload it first b4 it play?? Below is my script:
=========================================
//create a new instance of the netConnection object
myConnection_nc = new NetConnection();
//handle any status changes and responses from the server
myConnection_nc.onStatus = function(info)
{
trace(“LEVEL:” +info.level+ "CODE: " +info.code);
startStreamSubscribe();
};
startStreamSubscribe = function () {
//streamName =“Scene10_760”;
//start a new NetStream channel in the myConnection_nc
play_ns = new NetStream(myConnection_nc);
//define an onStatus() function for the netstream
play_ns.onStatus = function(info){
trace(“NETSTREAM LEVEL” + info.level + "CODE: "+ info.code);
}
//attach the video stream to the embedded video object
my_video.attachVideo(play_ns);
play_ns.setBufferTime(30);
play_ns.play(“Scene10_760”);
//play_ns.play(streamName);
};
stopPlay = function() {
//change the button label, and the click handler
play_pb.setLabel("Start Playing ");
play_pb.setClickHandler(“startPlay”);
//close the NetStream to stop the play
play_ns.close();
};
startPlay = function () {
//change the button label, and the click handler
play_pb.setLabel(“Stop Playing”);
play_pb.setClickHandler(“stopPlay”);
//attach the NetStream as the video source
my_video.attachVideo(play_ns);
play_ns.play(“Scene10_760”,-2,-1);
};
//make the connection to the server
myConnection_nc.connect(“rtmp://172.16.218.16/media_presentation1/video”);
stop();
thanks:puzzle: