Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Desktop, Mobile and non-browser Environments > AIR (Apollo)

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-05-2008, 06:07 PM   #1
Muncey
Registered User
 
Join Date: Jan 2007
Posts: 5
Default Communicating with XML file on web server

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!
Muncey is offline   Reply With Quote
Old 04-16-2008, 12:09 PM   #2
aftershock
freshairapps.com
 
Join Date: Dec 2006
Posts: 40
Default

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.");
}
If you are using HTML then you will need to utilise JavaScript and possibly AJAX to call any external data. Look at jQuery, PrototypeJs or MooTools as a start.
aftershock is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 11:05 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.