Question:
Trying to load XML with AS3?
Michael O
2009-06-14 18:38:41 UTC
I am using the Flash CS4 and I'm looking to read in an XML file for use as variables and the like. But pretty much right away I get hit with this:

TypeError: Error #1006: value is not a function.

The code I'm using is the following:

var my_xml = new XML();
my_xml.load("my_document.xml");

I haven't even added a onLoad function and even when I do it gives me the same error. I know the XML file is ok and in the same directory.

This is probably some easy beginner setting or something, but as I don't know anybody else who knows flash, I've been trying to teach myself, with very limited success. any help you could give would be appreciated.
Three answers:
Paladin01_98
2009-06-14 19:16:18 UTC
As far as I can tell the load method for the xml class is only available in actionscript 2.0 You need to look into using the URLLoader class and pass it to the constructor of your xml object.



Here is a link that describes one way of doing it. http://theflashblog.com/?p=242
?
2009-06-14 18:58:58 UTC
Programming Helps-

http://programmingtips.org/
carrozza
2016-11-14 06:44:19 UTC
in case you have Adobe Encore you are able to create a slideshow in it, then save it as a fla/flv import it into flash and save as a swf. yet otherwise i cant assist you lots, as i've got have been given been attempting to establish it out in flash as properly


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...