Bytestotal (Netstream.bytestotal Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

See also

bytesTotal (NetStream.bytesTotal property)

(NetStream.bufferLength property)
bytesTotal (NetStream.bytesTotal property)
public bytesTotal : Number [read-only]
The total size in bytes of the file being loaded into the player.
Availability: ActionScript 1.0; Flash Player 7
Example
The following example creates a progress bar using the Drawing API and the
and
properties that displays the loading progress of video1.flv into the video
bytesTotal
object instance called
display information about the loading progress as well.
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("video1.flv");
this.createTextField("loaded_txt", this.getNextHighestDepth(), 10, 10, 160,
22);
this.createEmptyMovieClip("progressBar_mc", this.getNextHighestDepth());
progressBar_mc.createEmptyMovieClip("bar_mc",
progressBar_mc.getNextHighestDepth());
with (progressBar_mc.bar_mc) {
beginFill(0xFF0000);
moveTo(0, 0);
lineTo(100, 0);
lineTo(100, 10);
lineTo(0, 10);
lineTo(0, 0);
endFill();
_xscale = 0;
}
progressBar_mc.createEmptyMovieClip("stroke_mc",
progressBar_mc.getNextHighestDepth());
with (progressBar_mc.stroke_mc) {
lineStyle(0, 0x000000);
moveTo(0, 0);
lineTo(100, 0);
lineTo(100, 10);
lineTo(0, 10);
lineTo(0, 0);
. A text field called
my_video
,
bufferLength
is dynamically created to
loaded_txt
bytesLoaded
NetStream
971

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF