Getbytesloaded (Xml.getbytesloaded Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

If no
declaration was encountered during a parse operation, the
DOCTYPE
property is set to
undefined
immediately after the XML declaration stored in
XML.docTypeDecl
before any other text in the XML object. If
declaration is output.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example uses the
for an XML object:
my_xml.docTypeDecl = "<!DOCTYPE greeting SYSTEM \"hello.dtd\">";
See also
xmlDecl (XML.xmlDecl property)

getBytesLoaded (XML.getBytesLoaded method)

public getBytesLoaded() : Number
Returns the number of bytes loaded (streamed) for the XML document. You can compare the
value of
getBytesLoaded()
percentage of an XML document has loaded.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- An integer that indicates the number of bytes loaded.
Number
Example
The following example shows how to use the
XML.getBytesTotal()
replace the URL parameter of the
valid XML file using HTTP. If you attempt to use this example to load a local file that resides
on your hard disk, this example will not work properly because in test movie mode Flash
Player loads local files in their entirety.
// create a new XML document
var doc:XML = new XML();
var checkProgress = function(xmlObj:XML) {
var bytesLoaded:Number = xmlObj.getBytesLoaded();
var bytesTotal:Number = xmlObj.getBytesTotal();
724
ActionScript classes
. The
XML.toString()
XML.docTypeDecl
XML.docTypeDecl
with the value of
method to trace the progress of an
XML.load()
method outputs the contents of
is undefined, no
property to set the
to determine what
getBytesTotal()
XML.getBytesLoaded()
XML.load()
command so that the parameter refers to a
XML.docTypeDecl
, and
XML.xmlDecl
DOCTYPE
declaration
DOCTYPE
method with the
command. You must

Advertisement

Table of Contents
loading

Table of Contents