dalekmx2004
03-17-2004, 05:12 AM
Hi there - first post and trying to unravel the vagaries of the esoteric progressive video functions in flash mx2004!
I'm streaming in video from the same server rather than using communication server mx. What I'm after is a streaming display/buffer display to give feedback to the user. I know I could use the Components, but frankly I'd rather not (I'm the only person in the studio with the pro version at the moment, so my files need to be openable by everyone else here, plus I want to have absolute control over the function and look of the interface).
A fantastic example of what I'm trying to achieve can be found at http://www.khfilms.com/kh.cfm (i believe they are a member here - very beautiful work!)
My problem is this...I'm trying to build in feedback of how much of the buffer has loaded (at the start), then how far the buffer has loaded in advance of the playhead. So far so good - I can access the bufferTime and bufferLength properties, but I can't access any meaningful values for the bytesLoaded property of the NetStream object. It always gives me the same result as the bytesTotal property - so as far as flash is concerned, the whole movie has been loaded instantly!
This is the standard code I'm using to connect to the video feed:
//create netconn object
var connection_nc:NetConnection = new NetConnection;
//create local streaming connection;
connection_nc.connect(null);
//create a net stream
var videoFeed_ns:NetStream = new NetStream(connection_nc);
//handle status events
videoFeed_ns.onStatus = function(infoObj){
onStatus_txt.text = infoObj.code;
}
//attach the feed to the video placeholder
this.placeholder_video.attachVideo(videoFeed_ns);
//set buffer time
videoFeed_ns.setBufferTime(10);
//specify the source flv file
videoFeed_ns.play("videos/vidtest.flv");
nothing weird there!
to access the bytes total and bytes loaded i'm using the following code (on an enter frame event of a movie clip, so the code is evaluated at 25fps):
this._parent.bytesTotal_txt.text = _root.videoFeed_ns.bytesTotal;
this._parent.bytesLoaded_txt.text = _root.videoFeed_ns.bytesLoaded;
What I'm getting though is the bytes loaded value that is returned is exactly the same as the bytes total! Even with the simulate download option!
any idea what is going on?
I'm streaming in video from the same server rather than using communication server mx. What I'm after is a streaming display/buffer display to give feedback to the user. I know I could use the Components, but frankly I'd rather not (I'm the only person in the studio with the pro version at the moment, so my files need to be openable by everyone else here, plus I want to have absolute control over the function and look of the interface).
A fantastic example of what I'm trying to achieve can be found at http://www.khfilms.com/kh.cfm (i believe they are a member here - very beautiful work!)
My problem is this...I'm trying to build in feedback of how much of the buffer has loaded (at the start), then how far the buffer has loaded in advance of the playhead. So far so good - I can access the bufferTime and bufferLength properties, but I can't access any meaningful values for the bytesLoaded property of the NetStream object. It always gives me the same result as the bytesTotal property - so as far as flash is concerned, the whole movie has been loaded instantly!
This is the standard code I'm using to connect to the video feed:
//create netconn object
var connection_nc:NetConnection = new NetConnection;
//create local streaming connection;
connection_nc.connect(null);
//create a net stream
var videoFeed_ns:NetStream = new NetStream(connection_nc);
//handle status events
videoFeed_ns.onStatus = function(infoObj){
onStatus_txt.text = infoObj.code;
}
//attach the feed to the video placeholder
this.placeholder_video.attachVideo(videoFeed_ns);
//set buffer time
videoFeed_ns.setBufferTime(10);
//specify the source flv file
videoFeed_ns.play("videos/vidtest.flv");
nothing weird there!
to access the bytes total and bytes loaded i'm using the following code (on an enter frame event of a movie clip, so the code is evaluated at 25fps):
this._parent.bytesTotal_txt.text = _root.videoFeed_ns.bytesTotal;
this._parent.bytesLoaded_txt.text = _root.videoFeed_ns.bytesLoaded;
What I'm getting though is the bytes loaded value that is returned is exactly the same as the bytes total! Even with the simulate download option!
any idea what is going on?