snakebit Posted December 21, 2006 Share Posted December 21, 2006 Hi,I have php file which generate dynamically xml ([b]myXML.php[/b]), the problem come when I try to pars it with flash ([b]Macromedia Flash MX 2004[/b]) it didn't work:[code]myXML = new XML();myXML.ignoreWhite = true;myXML.onLoad = readXML;myXML.load("myXML.php");function readXML() { root = myXML.childNodes; trace(root);}[/code]the trace result is white output windowThe worse, there is no "null", "undefined" and etc. messages ???I think the problem is in PHP file, because when I parse real xml file with the same content everything work fine. Link to comment https://forums.phpfreaks.com/topic/31476-parsing-php-xml-file-with-flash/ Share on other sites More sharing options...
trq Posted December 21, 2006 Share Posted December 21, 2006 [quote]I think the problem is in PHP file[quote]Then post your code. This isn't an actionscript help forum. Link to comment https://forums.phpfreaks.com/topic/31476-parsing-php-xml-file-with-flash/#findComment-145801 Share on other sites More sharing options...
obsidian Posted December 21, 2006 Share Posted December 21, 2006 I agree with thorpe on this one. While some of us are familiar with Flash AS, here is not the place to ask those coding questions. However, I would recommend you hit your myXML.php directly and make sure that the page is displayed as you anticipated. Also, be sure you're sending out header information to declare the Contente-type as XML, too. Otherwise, if you have issues with that, please post them here. If you're after specific actionscript help, post it in the Miscellaneous board, and we'll see if we can't help you there. Link to comment https://forums.phpfreaks.com/topic/31476-parsing-php-xml-file-with-flash/#findComment-145807 Share on other sites More sharing options...
snakebit Posted December 21, 2006 Author Share Posted December 21, 2006 Sorry :-[ , that is what I want to do:[b]myClass.php[/b][CODE]class myTestClass{function myXMLoutputfunction(){header("Content-type: text/xml");echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" ."<test_node>" ."<nachalo>test_txt</nachalo>" ."</test_node>";}}[/CODE][b]showclass.php[/b][CODE]include("myClass.php");myTestClass::myXMLoutputfunction();[/CODE][b]showFlash.fla[/b][CODE]myXML = new XML();myXML.ignoreWhite = true;myXML.onLoad = readXML;myXML.load("myXML.php");function readXML() { root = myXML.childNodes; trace(root);}[/CODE]When I click on [b]showclass.php[/b] everiting is perfectly working, but loading it in flash is the problem :( Link to comment https://forums.phpfreaks.com/topic/31476-parsing-php-xml-file-with-flash/#findComment-145970 Share on other sites More sharing options...
obsidian Posted December 21, 2006 Share Posted December 21, 2006 If you put something like trace("Inside") within your readXML() function, does it get displayed? If not, it seems that the Flash doc is never finding the actual myXML.php page to load. Are they in the same directory? Link to comment https://forums.phpfreaks.com/topic/31476-parsing-php-xml-file-with-flash/#findComment-145981 Share on other sites More sharing options...
snakebit Posted December 21, 2006 Author Share Posted December 21, 2006 Yes, it's displayed and all files are in one directory Link to comment https://forums.phpfreaks.com/topic/31476-parsing-php-xml-file-with-flash/#findComment-145996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.