SullDC
09-17-2007, 11:04 PM
First I would like to apologize to FlashGordon for my comment before... I had a pretty bad day and I am sorry I "snapped." I'm sorry. Hope we can forgive and forget:rolleyes:
I am working with Lee's video tutorials to get a load bar in my custom player
I was able to get my connection working but it can't get the loader working. a trace of ns.bytesLoaded or even ns.bytesTotal gives me "0"
anyone have any ideas??
any help is greatly appreciated.
Although I am new to scripting, I am a professional web designer and will gladly offer my services to any potential helper for their help. Thanks!
//////////////////////////Connections///////////////
nc = new NetConnection();
nc.connect("rtmp://******.rtmphost.com/bes/");
nc.onStatus = function(info){
trace(info.code);
if(info.code == "NetConnection.Connect.Success"){
playLive();
}
};
playLive = function(){
ns = new NetStream(nc);
theVideo.attachVideo(ns);
theVideo.attachAudio(ns);
ns.play("movie");
};
///////////////Button/////////////////////////
playButton.onRelease = function() {
ns.pause();
};
///////////////Loader/////////////////////////
//calls videoStatus 10 times a second
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 269;
};
onEnterFrame = function(){
trace(ns.bytesTotal);
//Returning 0 !!!
};
I am working with Lee's video tutorials to get a load bar in my custom player
I was able to get my connection working but it can't get the loader working. a trace of ns.bytesLoaded or even ns.bytesTotal gives me "0"
anyone have any ideas??
any help is greatly appreciated.
Although I am new to scripting, I am a professional web designer and will gladly offer my services to any potential helper for their help. Thanks!
//////////////////////////Connections///////////////
nc = new NetConnection();
nc.connect("rtmp://******.rtmphost.com/bes/");
nc.onStatus = function(info){
trace(info.code);
if(info.code == "NetConnection.Connect.Success"){
playLive();
}
};
playLive = function(){
ns = new NetStream(nc);
theVideo.attachVideo(ns);
theVideo.attachAudio(ns);
ns.play("movie");
};
///////////////Button/////////////////////////
playButton.onRelease = function() {
ns.pause();
};
///////////////Loader/////////////////////////
//calls videoStatus 10 times a second
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 269;
};
onEnterFrame = function(){
trace(ns.bytesTotal);
//Returning 0 !!!
};