Copy link to clipboard
Copied
Im making a Iphone app, going well looks great, cant wait to publish it. But i have one small question.
I know i can update the app via xml, which is fine i know its possible and i know how to make actionscript display data from a external xml.
But once the app is on the app store how can it get data from xml how will i keep updating it?????
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("https://rapidshare.com/files/1684039830/updates.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
myXML = new XML(e.target.data);
trace(myXML.*);
}
I'm not sure whether the rapidshare will work because they give the file to download. Test on desktop first then goto ipad.
Copy link to clipboard
Copied
Yes you can update the xml data if you not attached while packaging, instead you should keep your xml in the server and load the xml using the urlloader from your server. Anytime you can update it because your main app already compiled to read those xml while packaging.
Copy link to clipboard
Copied
so upload the xml onto a sever? then call the xml from the server using a URLLoader Event?
Great, which server should i use?
Copy link to clipboard
Copied
I meant it something like below:
"http://www.mydomain.com/xml/fetchdata.xml"
Copy link to clipboard
Copied
ooooooooh, i dont want to display xml data from a website i mean like, on a app, say i have a updates page, with my social events ect (just a examle) i want to display that, then be able to update it regulary...
Copy link to clipboard
Copied
If you dont have any hosting server, then there is no way to update your xml . Otherwise you need to update your xml and package it again, if you want to use as an attachment.
Copy link to clipboard
Copied
yeah well i could put it onto a websites server i guess, but is there no other way?? if i put it onto a file hosting site and then call it from there?
Copy link to clipboard
Copied
yes, thats a much better idea. do it that way
Copy link to clipboard
Copied
allright then thanks
Copy link to clipboard
Copied
ok so found a new problem, there are many free file hosting sites, which is great but then everytime i would edit the xml, it would make a new file on the hosting site would it not? which means the as3 couldn't display it because i cannot edit the as3 whilst on the app store. So i think i found a solution, xml hosting but they say its for websites.... so then would it work???
Copy link to clipboard
Copied
as already suggested just get your own server, thats all a file hosting site is. But you will have complete control over file names, folders, etc.
Copy link to clipboard
Copied
a quick google...
have a look at this http://www.000webhost.com/
seems completely free if you arent fussy about the domain name
Copy link to clipboard
Copied
thanks for that, but the thing is, its not for a website.. Im developing a IPhone app
Copy link to clipboard
Copied
not sure you are getting the distinction
a 'website' is just a server with a file called index.html that opens when you visit the domain with a browser
but you can put other files on it, its just a remote hard drive that can be accessed outside your house.
so www.yourdomain.com would open the 'website'
but www.yourdomain.com/myappdata.xml would be the data for your iphone app
so just ignore the 'website' aspect of it and just use it to host your app data
Copy link to clipboard
Copied
oooooooooh ok thanks, i thought so, that was very helpfull though
Copy link to clipboard
Copied
i put it onto rapidshare, because i think it works well, how would i call it in actionscript if the url is: https://rapidshare.com/files/1684039830/updates.xml
URLLoader = new URL... whats the code i need?
Copy link to clipboard
Copied
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("https://rapidshare.com/files/1684039830/updates.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
myXML = new XML(e.target.data);
trace(myXML.*);
}
I'm not sure whether the rapidshare will work because they give the file to download. Test on desktop first then goto ipad.
Copy link to clipboard
Copied
which server?
your server
if you dont have one then then google it. There are plenty of free servers that even have php and mysql installed. You might have a banner or advert but that wont matter if you only use it to host data for transfering to flex, it will never be seen