03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

this.createTextField("my_txt", this.getNextHighestDepth(), 0, 0,<br />

Stage.width, Stage.height);<br />

my_txt.border = true;<br />

my_txt.multiline = true;<br />

my_txt.wordWrap = true;<br />

my_txt.setNewTextFormat(my_fmt);<br />

var my_xml:XML = new XML();<br />

my_xml.ignoreWhite = true;<br />

my_xml.onLoad = function(success:Boolean) {<br />

var endTime:Number = getTimer();<br />

var elapsedTime:Number = endTime-startTime;<br />

if (success) {<br />

my_txt.text = "xmlDecl:"+newline+my_xml.xmlDecl+newline+newline;<br />

my_txt.text +=<br />

"contentType:"+newline+my_xml.contentType+newline+newline;<br />

my_txt.text +=<br />

"docTypeDecl:"+newline+my_xml.docTypeDecl+newline+newline;<br />

my_txt.text += "packet:"+newline+my_xml.toString()+newline+newline;<br />

} else {<br />

my_txt.text = "Unable to load remote XML."+newline+newline;<br />

}<br />

my_txt.text += "loaded in: "+elapsedTime+" ms.";<br />

};<br />

my_xml.load("http://www.helpexamples.com/crossdomain.xml");<br />

var startTime:Number = getTimer();<br />

The MovieClip.getNextHighestDepth() method used in this example requires Flash Player<br />

7 or later. If your SWF file includes a version 2 component, use the version 2 components'<br />

DepthManager class instead of the MovieClip.getNextHighestDepth() method.<br />

See also<br />

docTypeDecl (XML.docTypeDecl property)<br />

1334 <strong>ActionScript</strong> classes

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

Saved successfully!

Ooh no, something went wrong!