03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

this.createEmptyMovieClip("progressBar_mc", this.getNextHighestDepth());<br />

progressBar_mc.createEmptyMovieClip("bar_mc",<br />

progressBar_mc.getNextHighestDepth());<br />

with (progressBar_mc.bar_mc) {<br />

beginFill(0xFF0000);<br />

moveTo(0, 0);<br />

lineTo(100, 0);<br />

lineTo(100, 10);<br />

lineTo(0, 10);<br />

lineTo(0, 0);<br />

endFill();<br />

_xscale = 0;<br />

}<br />

progressBar_mc.createEmptyMovieClip("stroke_mc",<br />

progressBar_mc.getNextHighestDepth());<br />

with (progressBar_mc.stroke_mc) {<br />

lineStyle(0, 0x000000);<br />

moveTo(0, 0);<br />

lineTo(100, 0);<br />

lineTo(100, 10);<br />

lineTo(0, 10);<br />

lineTo(0, 0);<br />

}<br />

var loaded_interval:Number = setInterval(checkBytesLoaded, 500, stream_ns);<br />

function checkBytesLoaded(my_ns:NetStream) {<br />

var pctLoaded:Number = Math.round(my_ns.bytesLoaded/<br />

my_ns.bytesTotal*100);<br />

loaded_txt.text = Math.round(my_ns.bytesLoaded/1000)+" of<br />

"+Math.round(my_ns.bytesTotal/1000)+" KB loaded ("+pctLoaded+"%)";<br />

progressBar_mc.bar_mc._xscale = pctLoaded;<br />

if (pctLoaded>=100) {<br />

clearInterval(loaded_interval);<br />

}<br />

}<br />

bytesTotal (NetStream.bytesTotal property)<br />

public bytesTotal : Number [read-only]<br />

The total size in bytes of the file being loaded into the player.<br />

Availability<br />

ActionScript 1.0; Flash Player 7<br />

NetStream 501

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!