N1KO Posted March 14, 2007 Share Posted March 14, 2007 Attached is all the files needed to make a translation. I am a Flash Programmer in need of a PHP vertion of the ASP files described here. They are extreamly simple and short, so it should be a walk in the park for anyone who understands ASP and PHP even remotely.. I have made several attempts in doing it my self, but just can't get to the right info.. Please help me, I would be very gratfull. Thank you in advanced.. XMLObjectWDatasetParams.fla var myXML:XML = new XML(); var sendXML:XML = new XML("<data><nametype>2</nametype></data>"); myXML.ignoreWhite = true; myXML.onLoad = function(success) { if(success) { for (var x=0;x<this.firstChild.childNodes.length;x++) { var empNode:XMLNode = this.firstChild.childNodes[x]; employees_ds.addItem({empid:empNode.attributes.empid, empname:empNode.attributes.empname, dept:empNode.attributes.dept }); } } else { //Throw error here } } sendXML.sendAndLoad("http://localhost/getXMLWParams.asp",myXML); loadvars.fla var myLoadVars:LoadVars = new LoadVars(); myLoadVars.onLoad = function(success) { if (success) { trace(myLoadVars.name1); trace(myLoadVars.name2); } else { //Throw error here } } myLoadVars.load("http://localhost/loadvars.asp"); getXMLWParams.asp <% response.ContentType="TEXT/XML" Set docReceived = CreateObject("MSXML2.DOMDocument") docReceived.async = False docReceived.load Request Set RequestRoot = docReceived.documentElement nametype = RequestRoot.getElementsByTagName("nametype")(0).text if nametype = "1" then response.write ("<?xml version='1.0'?><results_packet><rec empid='125' empname='Bill Frye' dept='Admin'/><rec empid='126' empname='Janice Corning' dept='Admin'/><rec empid='122' empname='John Taylor' dept='IS'/><rec empid='123' empname='Michelle Heinz' dept='Graphics'/><rec empid='121' empname='Phil Heinz' dept='Sales'/><rec empid='124' empname='Sarah Johnson' dept='Accounting'/></results_packet>") else response.write ("<?xml version='1.0'?><results_packet><rec empid='125' empname='Bill F' dept='Admin'/><rec empid='126' empname='Janice C' dept='Admin'/><rec empid='122' empname='John T' dept='IS'/><rec empid='123' empname='Michelle H' dept='Graphics'/><rec empid='121' empname='Phil H' dept='Sales'/><rec empid='124' empname='Sarah J' dept='Accounting'/></results_packet>") end if response.end %> loadvarsSend.asp <% response.write "&name1=" & request("param1") & "&name2=" & request("param2") & "&" response.end %> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.