| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jan 2007
Posts: 5
|
Ok i have hosting and i'm just wondering if it is possible to connect to my host and drag information directly from an XML file on the site?
I'm pretty clueless atm on how to do this. I did think of using URL loader but then i would need to use php scripts to get the XML from it so it wouldn't work in AIR. Really confused... Thanks in advance! |
|
|
|
|
|
#2 |
|
freshairapps.com
Join Date: Dec 2006
Posts: 40
|
What are you working in Flash, Flex or HTML ?
If you want to get XML from your server and you are using Flex say, you can call the hosted XML file using a URLRequest and URLLoader: Code:
var myXML:XML = new XML();
var XML_URL:String = "http://www.example.com/Sample3.xml";
var myXMLURL:URLRequest = new URLRequest(XML_URL);
var myLoader:URLLoader = new URLLoader(myXMLURL);
myLoader.addEventListener("complete", xmlLoaded);
function xmlLoaded(evtObj:Event) {
myXML = XML(myLoader.data);
trace("Data loaded.");
}
|
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash MX 2004 remoting: Works on localhost, but not on web server | lespaul00 | Flash Remoting | 0 | 01-07-2008 06:55 PM |
| leaving out path to xml file in same dir as swf | rohcahs | ActionScript 2.0 | 6 | 10-18-2007 06:55 PM |
| saving xml object from flash to a file | abz121 | ActionScript 2.0 | 0 | 10-12-2007 11:44 AM |
| XML scope question | X-Fe@R | ActionScript 2.0 | 1 | 07-19-2007 12:12 PM |
| Loading video via netConnection with file paths from XML | seanknight11 | ActionScript 2.0 | 1 | 07-16-2007 12:54 AM |