2. draw a bar and make it a mc, instance name: bar
3. make 3 dinamic text, instance name:
- porc_txt
- kb1
- kb2
4. add this as:
stop();
_root.bar._xscale = 0;
//size of the bar
_root.onEnterFrame = function() {
// im adding a new function
total = _root.getBytesTotal();
//total=total bytes
loaded = _root.getBytesLoaded();
//loaded = bytes loaded
porc = Math.round((loaded*100)/total);
//and here the porcent
_root.bar._xscale = porc;
_root.porc_txt.text = porc+"%";
_root.kb1.text = Math.round(loaded/1024);
_root.kb2.text = Math.round(total/1024);
//bytes/1024=kb
if (loaded == total) {
gotoAndPlay("Escena 2", 1);
}
};
5. in a new scene put the animation or the game ^^