
MovieClip.getDepth() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
660
|
ActionScript Language Reference
returns the size of the existing content in mc (prior to the loadMovie() or unloadMovie()
statement). An empty movie clip created manually during authoring has a byte size of
4. An empty movie clip created via MovieClip.createEmptyMovieClip() has a byte size
of 0.
• Once the file size is determined, getBytesTotal() returns the complete size of
mc, unless
the file at
url is not found.
• If the file at
url is not found, getBytesTotal() returns –1 (even if mc is a document _level
that did not previously exist) and getBytesLoaded() returns 0.
• After an unloadMovie() command executes, getBytesTotal() returns 0 if
mc is a movie
clip or
undefined if mc is a document level, such as _level0. The same applies to
getBytesLoaded().
Usage
As with getBytesLoaded(), in Flash 6 the return of getBytesTotal() reflects the uncom-
pressed size of the .swf file being loaded, not the size of the file after Flash compression has
been applied. This means that getBytesTotal() for a .swf file with a post-compression size of
2,000 bytes might return, say, 10,000 bytes. As such, it cannot be used to predict the time
left in the download of a compressed .swf file. It is intended to offer only a relative measure
of the percentage of the file that is downloaded, ...