Frame 1
function checkBytesLoaded(my_ns) {
var _local1 = Math.round((my_ns.bytesLoaded / my_ns.bytesTotal) * 100);
loaded_txt.text = ((((Math.round(my_ns.bytesLoaded / 1000) + " of ") + Math.round(my_ns.bytesTotal / 1000)) + " KB loaded (") + _local1) + "%)";
progressBar_mc.bar_mc._xscale = _local1;
if (_local1 >= 100) {
clearInterval(loaded_interval);
loaded_txt.removeTextField();
stopAllSounds();
gotoAndPlay (2);
}
}
var connection_nc = new NetConnection();
connection_nc.connect(null);
var stream_ns = new NetStream(connection_nc);
stream_ns.play("flv.php?f=HatCap.flv");
this.createTextField("loaded_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
var loaded_interval = setInterval(checkBytesLoaded, 100, stream_ns);
stop();
Frame 2
tealcSound = new Sound(this);
tealcSound.attachSound("mega");
tealcSound.start(0, 99999);
Frame 3
var ncConection = new NetConnection();
ncConection.connect(null);
var nsStream = new NetStream(ncConection);
nsStream.onStatus = function (oInfo) {
if (oInfo.code == "NetStream.Play.Stop") {
nsStream.seek(0);
nsStream.play();
}
};
vMavideo.attachVideo(nsStream);
nsStream.play("flv.php?f=HatCap.flv");
stop();