romeooros
03-08-2008, 04:23 PM
Hello,
I'm not too experienced with Flash and often follow tutorials for getting what I need done. I am creating a progress bar for .flv movies (loaded externally) and the bar depicts itself as loading from the center our versus left to right.
I've reviewed the code several times and can't find anything wrong with. Any advice?
below is the code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
ns.play("http://futureperfekt.com/calstreetskater.flv");
playButton.onRelease = function() {
ns.pause();
}
pauseButton.onRelease = function() {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 282;
}
I'm not too experienced with Flash and often follow tutorials for getting what I need done. I am creating a progress bar for .flv movies (loaded externally) and the bar depicts itself as loading from the center our versus left to right.
I've reviewed the code several times and can't find anything wrong with. Any advice?
below is the code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
ns.play("http://futureperfekt.com/calstreetskater.flv");
playButton.onRelease = function() {
ns.pause();
}
pauseButton.onRelease = function() {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 282;
}